Git Product home page Git Product logo

pharmai / plip Goto Github PK

View Code? Open in Web Editor NEW
429.0 15.0 102.0 9.13 MB

Protein-Ligand Interaction Profiler - Analyze and visualize non-covalent protein-ligand interactions in PDB files according to πŸ“ Adasme et al. (2021), https://doi.org/10.1093/nar/gkab294

Home Page: http://plip.biotec.tu-dresden.de

License: GNU General Public License v2.0

Python 99.12% Shell 0.15% Dockerfile 0.73%
scientific-computing bioinformatics protein-structure plip singularity python-bindings openbabel pdb docker

plip's Introduction

Protein-Ligand Interaction Profiler (PLIP)

PLIP Build GitHub GitHub All Releases Docker Pulls Docker Image Size (tag)

Analyze noncovalent protein-ligand interactions in 3D structures with ease.

PLIP Logo

Use Case Web Server Docker Singularity Python Module
"I want to analyze my protein-ligand complex!" βœ”οΈ βœ”οΈ 🟑 ❌
"I want to analyze a billion protein-ligand complexes!" ❌ 🟑 βœ”οΈ 🟑
"I love the Linux command line and want to build a workflow around PLIP!" ❌ βœ”οΈ βœ”οΈ 🟑
"I'm a Python programmer and want to use PLIP in my project!" ❌ 🟑 🟑 βœ”οΈ

Quickstart

Docker

If you have Docker installed, you can run a PLIP analysis for the structure 1vsn with the following shell command:

On Linux / MacOS:

$ docker run --rm \
    -v ${PWD}:/results \
    -w /results \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    pharmai/plip:latest -i 1vsn -yv

On Windows:

$ docker run --rm \
    -v ${PWD}:/results \
    -w /results \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    pharmai/plip:latest -i 1vsn -yv

Singularity

The equivalent command for our pre-built Singularity image for Linux (available under Releases) is as follows:

$ ./plip.simg -i 1vsn -yv

Singularity allows to use PLIP with ease in HPC environments. Note that you need to have Singularity installed on your base system.


Usage

This README provides instructions for setup and using basic functions of PLIP. For more details, see the Documentation.

1. Install PLIP

Containerized Image (recommended)

❗ We ship PLIP as pre-built containers for multiple architectures (amd64/ARM), available on the Docker Hub or as pre-built Singularity image under Releases. See the quickstart section above for usage instructions.

Dependencies

If you cannot use the containerized bundle or want to use PLIP sources, make sure you have the following requirements installed:

  • Python >= 3.6.9
  • OpenBabel >= 3.0.0 with Python bindings
  • PyMOL >= 2.3.0 with Python bindings (optional, for visualization only)
  • ImageMagick >= 7.0 (optional)

Python: If you are on a system where Python 3 is executed using python3 instead of just python, replace the python and pip commands in the following steps with python3 and pip3 accordingly.

OpenBabel: Many users have trouble setting up OpenBabel with Python bindings correctly. We therefore provide some installation help for OpenBabel below.

From Source

Open a terminal and clone this repository using

$ git clone https://github.com/pharmai/plip.git

Either set your PYTHONPATH environment variable to the root directory of your PLIP repository or run the following command in it

$ python setup.py install

Via PyPi

We deploy the PLIP package to PyPi. You can install PLIP as Python module with:

$ pip install plip

Note: Be aware that you still have to install the above mentioned dependencies and link them correctly.

2. Run PLIP

Command Line Tool

Run the plipcmd.py script inside the PLIP folder to detect, report, and visualize interactions. The following example creates a PYMOL visualization for the interactions between the inhibitor NFT and its target protein in the PDB structure 1vsn.

Note: If you have installed PLIP with python setup.py install or PyPi, you will not have to set an alias for the plip command.

# Set an alias to make your life easier and create and enter /tmp/1vsn
$ alias plip='python ~/plip/plip/plipcmd.py'
$ mkdir /tmp/1vsn && cd /tmp/1vsn
# Run PLIP for 1vsn and open the resulting visualization in PyMOL
$ plip -i 1vsn -yv
$ pymol 1VSN_NFT_A_283.pse

Python Module

In your terminal, add the PLIP repository to your PYTHONPATH variable. For our example, we also download a PDB file for testing.

$ export PYTHONPATH=~/plip:${PYTHONPATH}
$ cd /tmp && wget http://files.rcsb.org/download/1EVE.pdb
$ python

In python, import the PLIP modules, load a PDB structure and run the analysis. This small example shows how to print all numbers of residues involved in pi-stacking:

from plip.structure.preparation import PDBComplex

my_mol = PDBComplex()
my_mol.load_pdb('/tmp/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 my_interactions.pistacking]) # Prints [84, 129]

3. Investigate the Results

PLIP offers various output formats, ranging from renderes images and PyMOL session files to human-readable text files and XML files. By default, all files are deposited in the working directory unless and output path is provided. For a full documentation of running options and output formats, please refer to the Documentation.

Versions and Branches

For production environments, you should use the latest tagged commit from the master branch or refer to the Releases page. Newer commits from the master and development branch may contain new but untested and not documented features.

Contributors

PLIP Web Server

Visit our PLIP Web Server on plip-tool.biotec.tu-dresden.de.

License Information

PLIP is published under the GNU GPLv2. For more information, please read the LICENSE.txt file. Using PLIP in your commercial or non-commercial project is generally possible when giving a proper reference to this project and the publication in NAR.

Citation Information

If you are using PLIP in your work, please cite

Adasme,M. et al. PLIP 2021: expanding the scope of the protein-ligand interaction profiler to DNA and RNA. Nucl. Acids Res. (05 May 2021), gkab294. doi: 10.1093/nar/gkab294

or

Salentin,S. et al. PLIP: fully automated protein-ligand interaction profiler. Nucl. Acids Res. (1 July 2015) 43 (W1): W443-W447. doi: 10.1093/nar/gkv315

FAQ

I try to run PLIP, but I'm getting an error message saying: ValueError: [...] is not a recognised Open Babel descriptor type

Make sure OpenBabel is correctly installed. This error can occur if the installed Python bindings don't match the OpenBabel version on your machine. We don't offer technical support for installation of third-party packages but added some installation help for OpenBabel below. Alternatively you can refer to their website.

I'm unsure on how to run PLIP and don't have much Linux experience.

You should consider running PLIP as Docker image, as we describe above.

PLIP is reporting different interactions on several runs!

Due to the non-deterministic nature on how hydrogen atoms can be added to the input structure, it cannot be guaranteed that each run returns exactly the same set of interactions. If you want to make sure to achieve consistent results, you can:

  • protonate the input structure once with PLIP or your tool of preference
  • run PLIP with --nohydro

How does PLIP handle NMR structures?

By default PLIP uses the first model it sees in a PDB file. You can change this behavior with the flag --model.

Installing OpenBabel

As many users encounter problems with installing the required OpenBabel tools, we want to provide some help here. However, we cannot offer technical support. Comprehensive information about the installation of OpenBabel for Windows, Linux, and macOS can be found in the OpenBabel wiki and the OpenBabel Docs. Information about the installation of OpenBabel Python bindings can also be found there.

Using Conda, HomeBrew or the binary Windows Installer

Install OpenBabel using the binary from GitHub or with

# For Conda users
$ conda install openbabel -c conda-forge
# On macOS
$ brew install open-babel

Install the Python bindings with

$ pip install openbabel

Note: If you have trouble, make sure the OpenBabel version matches the one for the python bindings!

Using your Package Manager (Example for Ubuntu 20.04)

$ apt-get update && apt-get install -y \
    libopenbabel-dev \
    libopenbabel6 \
    python3-openbabel \
    openbabel

From Source (Example for Ubuntu 18.04)

Clone the OpenBabel repository into the /src directory

$ git clone -b openbabel-3-0-0 \
https://github.com/openbabel/openbabel.git

Within /src/openbabel create end enter a directory /build and configure the build using

$ cmake .. \
-DPYTHON_EXECUTABLE=/usr/bin/python3.6 \
-DPYTHON_BINDINGS=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DRUN_SWIG=ON

From within the same directory (/src/openbabel/build) compile and install using

$ make -j$(nproc --all) install

Contact / Maintainer

As of April 2020 PLIP is now officially maintained by PharmAI GmbH. Do you have feature requests, found a bug or want to use PLIP in your project? Commercial support is available upon request.

Please get in touch: [email protected]

plip's People

Contributors

charleshahn avatar deepsource-autofix[bot] avatar fkaiserbio avatar kalinni avatar mestia avatar philippmatthes avatar ricrogz avatar unixjunkie avatar vjhaupt avatar xrobin avatar zrt avatar

Stargazers

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

Watchers

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

plip's Issues

Segfault with Python 3.6

The example ln the README segfaults with Python 3.6

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 17:14:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from plip.modules.preparation import PDBComplex

In [2]: my_mol = PDBComplex()

In [3]: my_mol.load_pdb('1EVE.pdb')

In [4]: print(my_mol)
Protein structure 1eve with ligands:
NAG:A:3002
NAG:A:3001
NAG:A:3004
NAG:A:3005
E20:A:2001

In [5]: my_bsid = 'E20:A:2001'

In [6]: my_mol.analyze()
[1] 29106 segmentation fault (core dumped) ipython

Usermanual

Is your feature request related to a problem? Please describe.
It's very hard, at least for me. Processing a lot of molecules using PLIp as part of a python script. I have tried everything for saving png visualization using pymol on various complex but i have got nothing.

Describe the solution you'd like
Add python module manual

Describe alternatives you've considered
Add a quick tutorial
Additional context
Add any other context or screenshots about the feature request here.

PLIP fails to recognize water bridges

For some structures, PLIP fails to recognize water bridges with:

  • Python 3.6
  • OpenBabel 3.0.0

Examples include: 4CUM where PLIP does not identify water bridges when used with Python 3 and OpenBabel 3.

Not a recognised Open Babel descriptor type

Dear, When I run this command

plipcmd -i 1ATP -v

I got into the problem which is:

ValueError: �Ɵ� is not a recognised Open Babel descriptor type

Can you help me

PyMol in setup.py requirements

PyMol on PyPI is not SchrΓΆdinger's pymol, and as far as I know there's no package for that on PyPI. In my opinion it should be removed, because it's misleading and causes an error:

$> pip install pymol
ERROR: Could not find a version that satisfies the requirement pymol (from versions: none)
ERROR: No matching distribution found for pymol

This was initially noticed in conda-forge/plip-feedstock#1 (comment)

plipcmd not in the good directory

Hi,

While I cloned the repo, the first time I tried to launch plip, I got the following error :
Traceback` (most recent call last): File "plipcmd", line 12, in <module> from plip.modules.preparation import * ModuleNotFoundError: No module named 'plip'

It seem the plipcmd should be in the upper directory. Or the import should be modules.preparation and not pip.odeules.preparation.

PLIP installation problem

I’m trying to install PLIP on my Linux machine and got an error during setting.
Pymol 1.8.0.2 from Schrodinger is installed on this linux machine but I don’t understand the error (see below).

Does it need a pymol python module, where should be this module ?

Cheers, FR.

ERROR:

Processing dependencies for plip==1.2.0
Searching for pymol
Reading https://pypi.python.org/simple/pymol/
No local packages or download links found for pymol
error: Could not find suitable distribution for Requirement.parse('pymol')

Error missing builtins module

Hi,
When I execute the command
plip -i 1vsn -yv

I've an error for File $MY_PLIPTOOL_PATH/plip/modules/preparation.py, line 9, in from builtins import filter
ImportError : No module named builtins.

ModuleNotFoundError: No module named 'plip.basic'

I am trying to install the latest PLIP beta on Ubuntu 19.10. I'm using an apt-get installed python 3.7.5, and a manually compiled and installed OpenBabel 3.1.1.

Then I tried to install the beta PLIP:

$ git checkout tags/v2.1.0-beta
$ python3 setup.py install --user
/usr/lib/python3/dist-packages/setuptools/dist.py:474: UserWarning: Normalizing '2.1.0-beta' to '2.1.0b0'
  normalized_version,
running install
running bdist_egg
running egg_info
writing plip.egg-info/PKG-INFO
writing dependency_links to plip.egg-info/dependency_links.txt
writing requirements to plip.egg-info/requires.txt
writing top-level names to plip.egg-info/top_level.txt
reading manifest file 'plip.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'plip.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/plip
copying plip/plipcmd.py -> build/lib/plip
copying plip/__init__.py -> build/lib/plip
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/plip
copying build/lib/plip/plipcmd.py -> build/bdist.linux-x86_64/egg/plip
copying build/lib/plip/__init__.py -> build/bdist.linux-x86_64/egg/plip
byte-compiling build/bdist.linux-x86_64/egg/plip/plipcmd.py to plipcmd.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/plip/__init__.py to __init__.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-3.7
copying and adjusting plip/plipcmd.py -> build/scripts-3.7
changing mode of build/scripts-3.7/plipcmd.py from 644 to 755
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.7/plipcmd.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/plipcmd.py to 755
copying plip.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying plip.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying plip.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying plip.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying plip.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying plip.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating dist
creating 'dist/plip-2.1.0b0-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing plip-2.1.0b0-py3.7.egg
creating /home/xavier/.local/lib/python3.7/site-packages/plip-2.1.0b0-py3.7.egg
Extracting plip-2.1.0b0-py3.7.egg to /home/xavier/.local/lib/python3.7/site-packages
Adding plip 2.1.0b0 to easy-install.pth file
Installing plipcmd.py script to /home/xavier/.local/bin

Installed /home/xavier/.local/lib/python3.7/site-packages/plip-2.1.0b0-py3.7.egg
Processing dependencies for plip==2.1.0b0
Searching for pymol==2.2.0
Best match: pymol 2.2.0
Adding pymol 2.2.0 to easy-install.pth file

Using /usr/lib/python3/dist-packages
Searching for openbabel==3.1.0
Best match: openbabel 3.1.0
Adding openbabel 3.1.0 to easy-install.pth file

Using /home/xavier/.local/lib/python3.7/site-packages
Searching for numpy==1.16.2
Best match: numpy 1.16.2
Adding numpy 1.16.2 to easy-install.pth file
Installing f2py script to /home/xavier/.local/bin
Installing f2py3 script to /home/xavier/.local/bin
Installing f2py3.7 script to /home/xavier/.local/bin

Using /usr/lib/python3/dist-packages
Searching for lxml==4.5.0
Best match: lxml 4.5.0
Adding lxml 4.5.0 to easy-install.pth file

Using /home/xavier/.local/lib/python3.7/site-packages
Finished processing dependencies for plip==2.1.0b0

As indicated by the log, plipcmd.py is correctly installed in /home/xavier/.local/bin. However it doesn't work:

$ which plipcmd.py
/home/xavier/.local/bin/plipcmd.py
$ plipcmd.py 
Traceback (most recent call last):
  File "/home/xavier/.local/bin/plipcmd.py", line 4, in <module>
    __import__('pkg_resources').run_script('plip==2.1.0b0', 'plipcmd.py')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1462, in run_script
    exec(code, namespace, namespace)
  File "/home/xavier/.local/lib/python3.7/site-packages/plip-2.1.0b0-py3.7.egg/EGG-INFO/scripts/plipcmd.py", line 16, in <module>
    from plip.basic import config, logger
ModuleNotFoundError: No module named 'plip.basic'

It looks like there was a problem during the installation, and some python files weren't copied. The plip folder within the egg is nearly empty:

$ ls /home/xavier/.local/lib/python3.7/site-packages/plip-2.1.0b0-py3.7.egg/plip/
__init__.py  __pycache__  plipcmd.py

And there is no plip folder directly in site-packages

$ ls /home/xavier/.local/lib/python3.7/site-packages/plip
ls: cannot access '/home/xavier/.local/lib/python3.7/site-packages/plip': No such file or directory

I'm not sure what's going on and how to proceed. Please let me know if you need any additional information to help solve the issue.

--name OUTPUTFILENAME not available in 1.4.1

I'm sorry I'm realizing this only now, as I'm rebuilding our singularity container to get it into an lmod module. It appears that the --name option didn't make it to v1.4.1 but is only available in the master branch which wasn't merged before the release.

Is it possible to have a new release with the --name option available?

Glutamic acid as hydrogen bond donor

Hi!

As shown below, a hydrogen bond is predicted between glutamic acid's side-chain with an oxygen. Under physiological pH, the side-chain should be deprotonated hence shouldn't act as a hydrogen bond donor?

Screenshot 2019-08-08 at 13 44 26

Installation of PLIP

Dear I am trying to install plip by using the downloaded local plip as well as by using pip as per instructions. However, I am getting this error when install from local plip setup.py

Reading https://pypi.python.org/simple/pymol/
No local packages or download links found for pymol
error: Could not find suitable distribution for Requirement.parse('pymol')

On the other hand after the installation by pip I could not find the command plip in command prompt.

Please help me to trouble shoot

Best regards,
Rehan

restype_lig and other text fields converted to float

I just ran into an issue with 1HDQ, where the ligand, INF, is wrongly converted to a floating point number representation of positive infinity, which causes issues downstream.

plipcmd -i 1hdq -x

And then:

>>> import plip.modules.plipxml as plip
>>> report = plip.PLIPXML("report.xml")
>>> print(report.bsites['INF:A:1308'].hydrophobics[0].restype_lig)
inf
>>> print(type(report.bsites['INF:A:1308'].hydrophobics[0].restype_lig))
<type 'float'>

When dumped into json the ligand name becomes Infinity (without quotes) instead of 'INF' (with quotes) so I cannot get the ligand back. When dumped with ujson an OverflowError is raised.

There are other ligand names which can be interpreted as numbers, for instance 1ONY has a ligand named 588, and a ligand named NAN exists, although it isn't used in any PDB entry so far.

Hydrogen Bond Annotation is Non-Deterministic

This might be linked with issue #49 I just opened, but this might be different so I am reporting it separately. Running with Python 3.6.6 and PLIP 1.4.5 from branch stable.

I an using 4DST again as before:

wget https://files.rcsb.org/download/4DST.pdb
plipcmd.py -f 4DST.pdb --name 4DST_report -o . -x

Here are two runs that display the problem:

I normally see 16 hydrogen bonds reported for ligand GCP:202. However if I run the same command again I can sometimes see a 17th bond popping up. In 4DST_report_3.6_4.xml you will see the new bond id="9" to VAL:29 on line 1030. It is the same as bond with id="10" but with the donor and acceptor atoms swapped.

Only one of the two is reported in XML file 4DST_report_3.6_1.xml.gz.

Is it expected to see different bonds from run to run?

Can't process large structures with more than 99999 atoms

An example is 4V9O:

$ plipcmd -i 4V9O
Error:  No file in PDB format available from wwPDB for the given PDB ID.

I currently have the structure stored in an "invalid" PDB format where atoms > 99999 are replaced by *****, but PLIP can't read the file:

/scicore/home/schwede/zohixe92/SMNG/stage/bin/sm run-plip -f /scicore/home/schwede/zohixe92/SMTL_ribosome/entries/4v/9o/biounit.1.pdb -o /scicore/home/schwede/zohixe92/SMTL_ribosome/entries/4v/9o --name plip_report.1 -x
Traceback (most recent call last):
  File "/opt/pliptool/plip/plipcmd", line 291, in <module>
    main(expanded_path, arguments.pdbid)  # Start main script
  File "/opt/pliptool/plip/plipcmd", line 152, in main
    process_pdb(inputstruct, config.OUTPATH, as_string=read_from_stdin, outputprefix=outputprefix)
  File "/opt/pliptool/plip/plipcmd", line 57, in process_pdb
    mol.load_pdb(pdbfile, as_string=as_string)
  File "/opt/pliptool/plip/modules/preparation.py", line 1286, in load_pdb
    pdbparser = PDBParser(pdbpath, as_string=as_string)  # Parse PDB file to find errors and get additonal data
  File "/opt/pliptool/plip/modules/preparation.py", line 28, in __init__
    self.proteinmap, self.modres, self.covalent, self.altconformations, self.corrected_pdb = self.parse_pdb()
  File "/opt/pliptool/plip/modules/preparation.py", line 61, in parse_pdb
    corrected_line, newnum = self.fix_pdbline(line, lastnum)
  File "/opt/pliptool/plip/modules/preparation.py", line 128, in fix_pdbline
    currentnum = int(pdbline[6:11])
ValueError: invalid literal for int() with base 10: '*****'

An alternative would be to read files in the mmCIF format, but that doesn't seem possible at the moment either.

I believe there are currently 482 structures with > 99999 atoms on PDB that I'd like to analyze.

Example command "plip -i 1vsn -yv" is not working

$plip -i 1vsn -yv
...
Checking status of PDB ID 1vsn ... entry is up to date.
Downloading file from PDB ... file downloaded as ./1vsn.pdb
...
PDB structure successfully read.
Analyzing one ligand...
...
Contains 2 aromatic ring(s).
Traceback (most recent call last):
File "/home/user/bin/source/pliptool/plip/plipcmd", line 306, in
main(expanded_path, arguments.pdbid) # Start main script
File "/home/user/bin/source/pliptool/plip/plipcmd", line 172, in main
process_pdb(pdbpath, config.OUTPATH, outputprefix=outputprefix)
File "/home/user/bin/source/pliptool/plip/plipcmd", line 68, in process_pdb
mol.characterize_complex(ligand)
File "/home/user/bin/source/pliptool/plip/modules/preparation.py", line 1390, in characterize_complex
lig_obj = Ligand(self, ligand)
File "/home/user/bin/source/pliptool/plip/modules/preparation.py", line 1001, in init
descvalues = self.molecule.calcdesc()
File "/usr/lib/python2.7/dist-packages/pybel.py", line 361, in calcdesc
raise ValueError("%s is not a recognised Open Babel descriptor type" % descname)
ValueError: @w7οΏ½ is not a recognised Open Babel descriptor type

#System set-up:
Python 2.7.2
Open Babel version: 2.3.2
Ubuntu 16.04 LTS

TypeError: unhashable type: 'OBAtom'

platform: macOS Catalina
python: 3.7.7

With reference to #46 I have commented out the three lines from supplemental.py

Error:

$ python3 plip/plipcmd.py -I 6lu7

/usr/local/lib/python3.7/site-packages/openbabel/__init__.py:14: UserWarning: "import openbabel" is deprecated, instead use "from openbabel import openbabel"
  warnings.warn('"import openbabel" is deprecated, instead use "from openbabel import openbabel"')
Traceback (most recent call last):
  File "plip/plipcmd.py", line 311, in <module>
    main_init()
  File "plip/plipcmd.py", line 307, in main_init
    main(expanded_path, arguments.pdbid)  # Start main script
  File "plip/plipcmd.py", line 171, in main
    process_pdb(pdbpath, config.OUTPATH, outputprefix=outputprefix)
  File "plip/plipcmd.py", line 63, in process_pdb
    mol.load_pdb(pdbfile, as_string=as_string)
  File "/Users/navanchauhan/Desktop/nCOV-19/scripts/plip/plip/modules/preparation.py", line 1354, in load_pdb
    ligandfinder = LigandFinder(self.protcomplex, self.altconf, self.modres, self.covalent, self.Mapper)
  File "/Users/navanchauhan/Desktop/nCOV-19/scripts/plip/plip/modules/preparation.py", line 229, in __init__
    self.ligands = self.getligs()
  File "/Users/navanchauhan/Desktop/nCOV-19/scripts/plip/plip/modules/preparation.py", line 274, in getligs
    ligands.append(self.extract_ligand(kmer))
  File "/Users/navanchauhan/Desktop/nCOV-19/scripts/plip/plip/modules/preparation.py", line 311, in extract_ligand
    hetatoms_res = set([(obatom.GetIdx(), obatom) for obatom in pybel.ob.OBResidueAtomIter(obresidue)
TypeError: unhashable type: 'OBAtom'

Segmentation fault with some files

I have 3 files in PDB format that cause a segmentation fault when I run plipcmd.

All the files I use are generated by OpenStructure, and only these 3 appear to cause a crash. I don't actually know if they are due to a single or multiple bugs. The PDB files from RCSB work fine.

$ gunzip 4lck.biounit.2.pdb.gz
$ plipcmd -f 4lck.biounit.2.pdb
Segmentation fault (core dumped)

I can see it crash with plip 1.4.0 and 1.4.1, both running Python 2.7.11 and OpenBabel 2.4.1.

I tried to run it on your web server and the job didn't get through either:

Sorry, your job has been failed for some reason. Please try again or contact us, if the problem still persists

So it doesn't seem to be specific to our system.

Difference between `atoms` and `orig_atoms` attributes

Hello, first of all thanks for the great package.

I'm playing around with some of the interaction objects return by the Python package, and I came across the pication and pistack ones:

Out[24]: pication(ring=aromatic_ring(atoms=[<pybel.Atom object at 0x7f88b75ee110>,
<pybel.Atom object at 0x7f88b75ee190>, <pybel.Atom object at 0x7f88b75ee210>, <pybel.Atom
object at 0x7f88b75ee310>, <pybel.Atom object at 0x7f88b75ee410>], orig_atoms=[<pybel.Atom
 object at 0x7f88b80f06d0>, <pybel.Atom object at 0x7f88b80f09d0>, <pybel.Atom object at 
0x7f88b80f0990>, <pybel.Atom object at 0x7f88b80f0a90>, <pybel.Atom object at 
0x7f88b80f0b10>], atoms_orig_idx=[224, 225, 226, 228, 230], normal=array([-0.34151512, 
-0.93419256,  0.10320694]), obj=<openbabel.OBRing; proxy of <Swig Object of type 
'OpenBabel::OBRing *' at 0x7f88b80ec0c0> >, center=[5.3118, 22.6008, 35.391999999999996], 
type='5-membered'), charge=lcharge(atoms=[<pybel.Atom object at 0x7f88b6499fd0>], 
orig_atoms=[<pybel.Atom object at 0x7f88b64ad350>], atoms_orig_idx=[5556], type='positive',
 center=[3.28, 19.829, 36.006], fgroup='tertamine'), distance=3.4911434344638432, 
offset=0.9939751145873313, type='regular', restype='HIS', resnr=17, reschain='A', 
restype_l='MOL', resnr_l=1, reschain_l='Z', protcharged=False)

I was wondering, what is the difference between the list of atoms in the atoms attribute and the one in orig_atoms?

plipcmd segfaults with PDBID 1u6b

plipcmd throws a segmentation fault when PDB entry 1u6b is used as an input. I haven't tried to debug the problem yet, but may look into it later.

$ plipcmd -v -i 1u6b

**********************************************
* Protein-Ligand Interaction Profiler v1.3.0 *
**********************************************


Checking status of PDB ID 1u6b ... entry is up to date.
Downloading file from PDB ... file downloaded as /tmp/1u6b.pdb


Starting analysis of 1u6b.pdb
===============================
PDB structure successfully read.
Excluded molecules as ligands: 5MU,A23,GTP
Analyzing 4 ligands...

K-MG-K-G-C-C-G-U-G-U... [RNA+ION] -- K:B:2 + MG:B:3 + K:B...
-------------------------------------------------------------
  [Warning] Could not write SMILES for this ligand.
Segmentation fault (core dumped)
  • PLIP version 1.3.0
  • Python 2.7.6
  • Ubuntu 14.04

Unstable results and large angle differences with Python 3.6

We are porting SWISS-MODEL to Python 3 (3.6.6 compiled with GCCcore-7.3.0). I am having trouble with the tests related to PLIP. It seems that the ordering of residues in the XML output (bs_residue) is arbitrary, and changes from run to run. This also results in slightly different numerical results from run to run. This would be fine, but some changes are surprisingly large.

To demonstrate the problem, I ran the following command on 4DST:

wget https://files.rcsb.org/download/4DST.pdb
plipcmd.py -f 4DST.pdb --name 4DST_report -o . -x

with PLIP 1.4.5 (from the stable branch), installed with pip install . under different conditions. I am attaching the XML outputs below (gzipped because GitHub doesn't accept XML directly).

Running diff -u 4DST_report_3.6_1.xml 4DST_report_3.6_2.xml higlights changes in ordering and rounding, which are fairly minor. But some changes are uncomfortably large. For instance if you compare the angles of the Pi stack between GCP:202 and PHE:28, the first decimal is off:

-          <angle>80.14</angle>
-          <offset>1.24</offset>
+          <angle>80.62</angle>
+          <offset>1.28</offset>

Is this expected?

Note that with Python 2.7, I was getting 80.21 reliably as an angle, and that this is what I get with the web version of PLIP.

missing dependency

Hi. When I install the command line version, the builtins module is missing. Fixed by "sudo pip2 install future". I'm using python Python 2.7.12 on Ubuntu 16.04 LTS.

Segmentation fault with PDB ID 3g71

I am getting a new segmentation fault on PDB ID 3g71. Latest PLIP version v1.4.2.

zohixe92@worker02:~/plip/excluded_ligands$ plipcmd -i 3g71 --verbose -x

**********************************************
* Protein-Ligand Interaction Profiler v1.4.2 *
**********************************************


Checking status of PDB ID 3g71 ... entry is up to date.
Downloading file from PDB ... file downloaded as ./3g71.pdb


Starting analysis of 3g71.pdb
===============================
75 lines automatically fixed in PDB input file.
PDB structure successfully read.
Segmentation fault

Is this a bug from PLIP v2.1.0-beta?

I am trying to run 'python plipcmd.py -i 1s3v -xv' and encounter the follow problem:

in extract_ligand() of preparation.py
hetatoms_res = set([(obatom.GetIdx(), obatom) for obatom in pybel.ob.OBResidueAtomIter(obresidue)
TypeError: unhashable type: 'OBAtom'

interesting related project

Hello,

At RCSB, they have a ligand viewer nowadays:
https://www.rcsb.org/3d-view/1OXR
then choose Ligand View and select AIN (aspirin).

They can detect all those interactions:
Hydrogen Bonds (blue)
Halogen Bonds (turquoise)
Hydrophobic Contacts (grey)
Pi Interactions (orange, green)
Metal Interactions (purple)

Does plip have all of them?

The molecular viewer is open source:
https://github.com/arose/ngl

Plip is even more useful because it is a standalone program one can run
from the command line.

Thanks,
F.

ValueError: inchikey is not a recognised Open Babel format

Hi, when I run the test_literature_validated.py, it has some errors asbelow:

Error
Traceback (most recent call last):
  File "D:\anaconda\envs\my-python2.7\lib\unittest\case.py", line 329, in run
    testMethod()
  File "E:\plip-stable\plip\test\test_literature_validated.py", line 469, in test_1aku
    tmpmol.characterize_complex(ligand)
  File "E:\plip-stable\plip\modules\preparation.py", line 1409, in characterize_complex
    lig_obj = Ligand(self, ligand)
  File "E:\plip-stable\plip\modules\preparation.py", line 1003, in __init__
    self.inchikey = self.molecule.write(format='inchikey')
  File "D:\anaconda\envs\my-python2.7\lib\site-packages\pybel.py", line 527, in write
    format)
ValueError: inchikey is not a recognised Open Babel format

my environment info:
image

It worked in version 1.3.3, but Now it did not work in 1.3.4 version for some PDB-ID

when I used 1.3.3, PDB-ID 1bju gave me all (vptyx) result. after upgrading to 1.3.4, it reported an error:

Run PLIP
**********************************************
* Protein-Ligand Interaction Profiler v1.3.4 *
**********************************************
Starting analysis of 1bju.pdb
================================
2217 lines automatically fixed in PDB input file.
Error:  File contains no valid molecules.

There was a fix pdb file in output folder (attached as f1bju-locally.pdb) but still give an error. When I downloaded a fix pdb file from https://projects.biotec.tu-dresden.de/plip-web/plip/ for the same PDB-ID / file (attached as f1bju-web.pdb), it worked again like charmed.

This is my system:
Win 7 32 bit (virtual: 1 core), Python 2.7.12, PyMOL 1.7.6.0, OpenBabel 2.4.1
Thanks

f1bju.zip

Please port to Python3

Hello,
the Debian Med team is maintaining PLIP for official Debian. The recently released Debian 10 was the last Debian release featuring Python2 since this programming language is EOL. If you are interested that we continue to maintain PLIP in official Debian (and that users of other modern distributions will have no problems to install PLIP on their systems) I'd recommend you port your code to Python3. The 2to3 tool might be of great help here.
Kind regards, Andreas.

Not supporting for multicore in Windows enviroment

when I did not set --maxthread to 1, plip did not work well. I got loop process in something like "..multiprocessing/fork.."
Plip can work again when we set 1 core.

Would you like to add this feature in the future update.

Thanks

Is 1.3.5 ready for python 3?

If it's right, what version of python 3, the 1.3.5 ready? Is 3.5, 3.6, or 3.7 version?

Thanks

BS

note: I tried this version (1.3.5) using python 2.7.13, pymol 1.7.6 for windows and got error result for 1bju.pdb

ImportError: cannot import name pyparsing_common

Hi,

I have been trying to download "plip" on my Mac laptop to use in a drug docking pipeline. When I try to run "plip" from the bash command line "$ plip" (after creating the alias) and from python, I get this same error:

Traceback (most recent call last):
File "/Users/gaby/pliptool/plip/plipcmd", line 33, in
from modules.preparation import *
File "/Users/gaby/pliptool/plip/modules/preparation.py", line 24, in
from detection import *
File "/Users/gaby/pliptool/plip/modules/detection.py", line 24, in
from supplemental import *
File "/Users/gaby/pliptool/plip/modules/supplemental.py", line 38, in
import pybel
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/init.py", line 61, in
from . import canonicalize
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/canonicalize.py", line 14, in
from .parser.language import rev_abundance_labels
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/init.py", line 5, in
from .parse_bel import BelParser
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/parse_bel.py", line 16, in
from .modifiers import *
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/modifiers/init.py", line 3, in
from .fragment import FragmentParser
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/modifiers/fragment.py", line 59, in
from pyparsing import pyparsing_common as ppc, Keyword, Optional
ImportError: cannot import name pyparsing_common

If i try the following:

$ python

import plip
import openbabel
import pyparsing

no error, however when I do the following command

from plip.modules.preparation import PDBComplex

I get the same error mentioned above.

now, in regards to pyparsing_comman. before trying plip command, I tried to import "pyparsing_common" to check if it was the problem. when I ran it this morning (before trying plip):
$ python

from pyparsing import pyparsing_common as ppc, Keyword, Optional

it works just fine, then I tried running same plip commands as above, I reach same import error!

I understand this seems crazy, however, I have no idea what to do, I tried everything.

for how I installed plip:

method 1: using pip

installed plip using pip which also installed the needed dependencies openbabel, numpy, lxml

image

Then I installed PyMol and all its dependencies using homebrew as indicated here
https://pymolwiki.org/index.php/MAC_Install

result: same error

Method 2: manual

before i installed using pip, i tried installing manually by downloading the plip-stable zip file and following the commands specified in the README file. when i reach the step

plip -i 1vsn -yv

I get the same error which is "ImportError: cannot import name pyparsing_common"
also installed openbabel and all other dependencies in this case and added needed stuff to the PATH variable.

python version: 2.7.10
OS X el capitan 10.11.3

Any help will be appriciated, i don't know how to solve this.

Thanks a lot and great work on this amazing software (i tried the web service and it provides amazing information regarding the interactions - especially the amazing 3D visualization of the interactions).

How does PLIP handle multiple models in a PDB structure?

Hi, I am sorry to bother you. I have some confusions about how does PLIP handle multiple models in a PDB structure.

just take 1lxf.pdb(downloaded in RCSB by [https://files.rcsb.org/download/1lxf.pdb]),it has 30 MODELs.

image

So I am confused. Which MODEL would be used in PLIP? Is the first one? Or choose one according to some rules?

Thanks for your time to read this message! Looking forward to you

Set up continuous integration

Because this project is already on GitHub, it would be a great thing in my opinion to set up continuous integration for this repository to improve code quality and cross-check pull requests. A good example for continuous integration can be found on our TU Dresden INLOOP-Project at https://github.com/st-tu-dresden/inloop. We use Travis and Codacy to review our code before merging it in master and deploying it on our servers. As in Pull Request st-tu-dresden/inloop#217 in our INLOOP Repository, one can see how the commited code is only passed-through after the code checks are positive. Setting up continuous integration (CI) is also very simple and can be done right away. Therefore I would propose CI for this repository. What do you think about it @ssalentin?

Example of python library

This piece of code was not working for me (in 2. Run PLIP - as a python library):

print [pistack.resnr for pistack in s.pistacking] # NameError: name 's' is not defined

I am not sure whether that is how it was supposed to be but with:
print [pistack.resnr for pistack in my_interactions.pistacking]
actually prints [84, 129]

Different results between web and command line

Describe the bug

Relevant files attached: 3sgj_smr.tar.gz

I'm trying to obtain the PLIP interactions for file 3sgj_smr.pdb (derived from PDB 3SGJ, see attachment above). When I run the same file on the command line, I get very different results than when I run it on the command line

I submitted a request to the web interface by uploading this file: 68269632-0eee-493b-993d-b2a5362840e0. In the SMALLMOLECULE section, under NAG, I can see several hydrogen bonds between NAG-_-1 and several residues in chain A: LYS.24, ASP.43, ASN.75, ARG.79.

I downloaded the XML report from this web report (3sgj_smr_plipweb_report.xml) and I can clearly see those interactions in there.

When I run PLIP on the command line with

plip -f 3sgj_smr.pdb -x

I can only see NAG-_-1 making hydrogen bonds with LYS.24. I can see no interactions with ASP.43, ASN.75 or ARG.79. See the file 3sgj_smr_plipcmd_report.xml in attachment.

This XML report was generated with PLIP 2.1.3, Python 3.6.6 and OpenBabel 3.1.1. However I get similar results with our older build PLIP 1.4.2/Python 2.7.11/OpenBabel 2.4.1 (all on Centos7 systems), as well as the current code on the master branch (which I guess is equivalent to v.2.1.4).

To Reproduce
Web:

  • Go to https://projects.biotec.tu-dresden.de/plip-web/plip/index
  • Select PDB file and Browse for file 3sgj_smr.pdb
  • Run analysis
  • Wait a bit
  • Open SMALLMOLECULE > NAG, > NAG-_-1 and look at Hydrogen bonds table.
  • Download XML with "... in XML format" link (giving 3sgj_smr_plipweb_report.xml)

Command line:

  • Run command plip -f 3sgj_smr.pdb -x
  • Look at report.xml file (equivalent to 3sgj_smr_plipcmd_report.xml).

Expected behavior
I was expecting to see the same interactions reported from the command line run and on the web.

What could explain these differences?

XMLParser: MetalComplex'es have no ligcoo and protcoo

In the XML parser, when I have a metal complex (say complex = pm.bsites['CU:_:2'].metal_complexes[0]) and I get the ligcoo or protcoo attributes, I get an empty list [] instead of a coordinates tuple.

This makes sense when I look at the XML itself: there is indeed no ligcoo/protcoo but instead metalcoo and targetcoo.

At this point I'm not sure if it's an issue with documentation (which has: "All | ligcoo" and "All | protcoo") or the XML writer in plipcmd. What is the reason to use different XML elements for metal complexes?

Not successful to run PLIP in python 3.5.2 64bit

here the verbose when installed from python setup.py install

`Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Python35\py35whl\plip>python setup.py install
running install
running bdist_egg
running egg_info
creating plip.egg-info
writing requirements to plip.egg-info\requires.txt
writing dependency_links to plip.egg-info\dependency_links.txt
writing top-level names to plip.egg-info\top_level.txt
writing plip.egg-info\PKG-INFO
writing manifest file 'plip.egg-info\SOURCES.txt'
reading manifest file 'plip.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'plip.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\plip
copying plip_init_.py -> build\lib\plip
creating build\lib\plip\modules
copying plip/modules\chimeraplip.py -> build\lib\plip/modules
copying plip/modules\config.py -> build\lib\plip/modules
copying plip/modules\detection.py -> build\lib\plip/modules
copying plip/modules\mp.py -> build\lib\plip/modules
copying plip/modules\plipremote.py -> build\lib\plip/modules
copying plip/modules\plipxml.py -> build\lib\plip/modules
copying plip/modules\preparation.py -> build\lib\plip/modules
copying plip/modules\pymolplip.py -> build\lib\plip/modules
copying plip/modules\report.py -> build\lib\plip/modules
copying plip/modules\supplemental.py -> build\lib\plip/modules
copying plip/modules\visualize.py -> build\lib\plip/modules
copying plip/modules\webservices.py -> build\lib\plip/modules
copying plip/modules_init_.py -> build\lib\plip/modules
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\plip
creating build\bdist.win-amd64\egg\plip\modules
copying build\lib\plip\modules\chimeraplip.py -> build\bdist.win-amd64\egg\plip
modules
copying build\lib\plip\modules\config.py -> build\bdist.win-amd64\egg\plip\modul
es
copying build\lib\plip\modules\detection.py -> build\bdist.win-amd64\egg\plip\mo
dules
copying build\lib\plip\modules\mp.py -> build\bdist.win-amd64\egg\plip\modules
copying build\lib\plip\modules\plipremote.py -> build\bdist.win-amd64\egg\plip\m
odules
copying build\lib\plip\modules\plipxml.py -> build\bdist.win-amd64\egg\plip\modu
les
copying build\lib\plip\modules\preparation.py -> build\bdist.win-amd64\egg\plip
modules
copying build\lib\plip\modules\pymolplip.py -> build\bdist.win-amd64\egg\plip\mo
dules
copying build\lib\plip\modules\report.py -> build\bdist.win-amd64\egg\plip\modul
es
copying build\lib\plip\modules\supplemental.py -> build\bdist.win-amd64\egg\plip
\modules
copying build\lib\plip\modules\visualize.py -> build\bdist.win-amd64\egg\plip\mo
dules
copying build\lib\plip\modules\webservices.py -> build\bdist.win-amd64\egg\plip
modules
copying build\lib\plip\modules_init_.py -> build\bdist.win-amd64\egg\plip\mod
ules
copying build\lib\plip_init_.py -> build\bdist.win-amd64\egg\plip
byte-compiling build\bdist.win-amd64\egg\plip\modules\chimeraplip.py to chimerap
lip.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\config.py to config.cpytho
n-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\detection.py to detection.
cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\mp.py to mp.cpython-35.pyc

byte-compiling build\bdist.win-amd64\egg\plip\modules\plipremote.py to plipremot
e.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\plipxml.py to plipxml.cpyt
hon-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\preparation.py to preparat
ion.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\pymolplip.py to pymolplip.
cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\report.py to report.cpytho
n-35.pyc
File "build\bdist.win-amd64\egg\plip\modules\report.py", line 100
print et.tostring(self.xmlreport, pretty_print=True)
^
SyntaxError: invalid syntax

byte-compiling build\bdist.win-amd64\egg\plip\modules\supplemental.py to supplem
ental.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\visualize.py to visualize.
cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules\webservices.py to webservi
ces.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip\modules_init_.py to init.cp
ython-35.pyc
byte-compiling build\bdist.win-amd64\egg\plip_init_.py to init.cpython-35
.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
installing scripts to build\bdist.win-amd64\egg\EGG-INFO\scripts
running install_scripts
running build_scripts
creating build\scripts-3.5
copying and adjusting plip\plipcmd -> build\scripts-3.5
creating build\bdist.win-amd64\egg\EGG-INFO\scripts
copying build\scripts-3.5\plipcmd -> build\bdist.win-amd64\egg\EGG-INFO\scripts
copying plip.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying plip.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying plip.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO

copying plip.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying plip.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying plip.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating dist
creating 'dist\plip-1.3.3-py3.5.egg' and adding 'build\bdist.win-amd64\egg' to i
t
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing plip-1.3.3-py3.5.egg
creating c:\python35\lib\site-packages\plip-1.3.3-py3.5.egg
Extracting plip-1.3.3-py3.5.egg to c:\python35\lib\site-packages
File "c:\python35\lib\site-packages\plip-1.3.3-py3.5.egg\plip\modules\report.p
y", line 100
print et.tostring(self.xmlreport, pretty_print=True)
^
SyntaxError: invalid syntax

Adding plip 1.3.3 to easy-install.pth file
Installing plipcmd script to C:\Python35\Scripts

Installed c:\python35\lib\site-packages\plip-1.3.3-py3.5.egg
Processing dependencies for plip==1.3.3
Searching for lxml==3.7.0
Best match: lxml 3.7.0
Adding lxml 3.7.0 to easy-install.pth file

Using c:\python35\lib\site-packages
Searching for numpy==1.11.3+mkl
Best match: numpy 1.11.3+mkl
Adding numpy 1.11.3+mkl to easy-install.pth file

Using c:\python35\lib\site-packages
Searching for openbabel==2.4.1
Best match: openbabel 2.4.1
Adding openbabel 2.4.1 to easy-install.pth file

Using c:\python35\lib\site-packages
Finished processing dependencies for plip==1.3.3

C:\Python35\py35whl\plip>`

Here the result when I typed python plipcmd in Python35 Scripts

`C:\Python35\Scripts>python plipcmd
Traceback (most recent call last):
File "c:\python35\lib\site-packages\plip-1.3.3-py3.5.egg\EGG-INFO\scripts\plip
cmd", line 25, in
from plip.modules.preparation import *
File "C:\Python35\lib\site-packages\plip-1.3.3-py3.5.egg\plip\modules\preparat
ion.py", line 24, in
from detection import *
ImportError: No module named 'detection'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "plipcmd", line 4, in
import('pkg_resources').run_script('plip==1.3.3', 'plipcmd')
File "C:\Python35\lib\site-packages\pkg_resources_init_.py", line 719, in r
un_script
self.require(requires)[0].run_script(script_name, ns)
File "C:\Python35\lib\site-packages\pkg_resources_init_.py", line 1504, in
run_script
exec(code, namespace, namespace)
File "c:\python35\lib\site-packages\plip-1.3.3-py3.5.egg\EGG-INFO\scripts\plip
cmd", line 33, in
from modules.preparation import *
ImportError: No module named 'modules'

C:\Python35\Scripts>`

How to resolve this?
I neeed your assisstance, thanks

OSX fails with resource.getrlimit (supplemental.py)

if os.name != 'nt':  # Resource module not available for Windows
        maxsize = resource.getrlimit(resource.RLIMIT_STACK)[-1]
        resource.setrlimit(resource.RLIMIT_STACK, (min(2 ** 28, maxsize), maxsize))

Causes the following error on OSX with python 3.6:

ValueError: current limit exceeds maximum limit

This has been encountered in a few other places, e.g.:
cea-hpc/clustershell#285

Easily fixed by ignoring for mac, like windows.

if os.name != 'nt' and platform.system() != 'Darwin':  
        maxsize = resource.getrlimit(resource.RLIMIT_STACK)[-1]
        resource.setrlimit(resource.RLIMIT_STACK, (min(2 ** 28, maxsize), maxsize))

plipcmd returns IndexError with PDBID 3q45

Hi,

plipcmd raises an IndexError when PDB ID 3q45 is used as an input. Apparently it has to do with the metal complex detection step. Here is the sample output:

$ plipcmd -v -i 3q45

**********************************************
* Protein-Ligand Interaction Profiler v1.3.1 *
**********************************************


Checking status of PDB ID 3q45 ... entry is up to date.
Downloading file from PDB ... file downloaded as ./3q45.pdb


Starting analysis of 3q45.pdb
===============================
PDB structure successfully read.
Analyzing 9 ligands...

MG-DAL-VAL [SMALLMOLECULE+ION] -- MG:D:1604 + DAL:D:24...
----------------------------------------------------------
  Binding site atoms in vicinity (7.5 A max. dist: 216).
  Reduced number of hydrophobic contacts from 15 to 6.
  Metal ion Mg complexed with square.planar geometry (coo. number 4/ 4 observed).
  Ligand interacts with 14 binding site residue(s) in chain(s) D.
  Complex uses 3 salt bridge(s), 5 hydrogen bond(s).

MG-DAL-VAL [SMALLMOLECULE+ION] -- MG:E:1605 + DAL:E:24...
----------------------------------------------------------
  Binding site atoms in vicinity (7.5 A max. dist: 214).
  Reduced number of hydrophobic contacts from 14 to 8.
  Metal ion Mg complexed with square.planar geometry (coo. number 4/ 4 observed).
  Ligand interacts with 17 binding site residue(s) in chain(s) E.
  Complex uses 3 salt bridge(s), 6 hydrogen bond(s).

MG-DAL-VAL [SMALLMOLECULE+ION] -- MG:H:1608 + DAL:H:24...
----------------------------------------------------------
  Binding site atoms in vicinity (7.5 A max. dist: 219).
  Reduced number of hydrophobic contacts from 15 to 8.
  Metal ion Mg complexed with trigonal.pyramidal geometry (coo. number 3/ 6 observed).
  Ligand interacts with 17 binding site residue(s) in chain(s) H.
  Complex uses 3 salt bridge(s), 7 hydrogen bond(s).

MG-DAL-VAL [SMALLMOLECULE+ION] -- MG:I:1609 + DAL:I:24...
----------------------------------------------------------
  Binding site atoms in vicinity (7.5 A max. dist: 217).
  Reduced number of hydrophobic contacts from 19 to 10.
  Metal ion Mg complexed with square.planar geometry (coo. number 4/ 6 observed).
  Ligand interacts with 17 binding site residue(s) in chain(s) I.
  Complex uses 3 salt bridge(s), 5 hydrogen bond(s).

MG-DAL-VAL [SMALLMOLECULE+ION] -- MG:B:1602 + DAL:B:24...
----------------------------------------------------------
  Binding site atoms in vicinity (7.5 A max. dist: 213).
  Reduced number of hydrophobic contacts from 15 to 8.
Traceback (most recent call last):
  File "/.../plip/plipcmd", line 321, in <module>
    main(expanded_path, arguments.pdbid)  # Start main script
  File "/.../plip/plipcmd", line 224, in main
    process_pdb(pdbpath, config.OUTPATH)
  File "/.../plip/plipcmd", line 80, in process_pdb
    mol.characterize_complex(ligand)
  File "/.../plip/modules/preparation.py", line 1281, in characterize_complex
    pli_obj = PLInteraction(lig_obj, bs_obj, self)
  File "/.../plip/modules/preparation.py", line 512, in __init__
    self.bindingsite.metal_binding)
  File "/.../plip/modules/detection.py", line 365, in metal_complexation
    next_total = all_total[i + 1]
IndexError: list index out of range

System information

  • PLIP 1.3.1
  • Ubuntu 14.04.5 LTS
  • Open Babel 2.3.2+dfsg-1.1
  • PyMOL 1.7.0.0
  • ImageMagick 6.7.7-10 2016-06-01 Q16

TypeError: '<' not supported between instances of 'Atom' and 'Atom' with Python 3

Running the current 'stable' branch from GitHub, Python 3.6.6 and OpenBabel 2.4.1, it seems that PLIP fails on water bridges:

$ python plip/plipcmd.py -i 3GKR
Traceback (most recent call last):
  File "plip/plipcmd.py", line 311, in <module>
    main_init()
  File "plip/plipcmd.py", line 307, in main_init
    main(expanded_path, arguments.pdbid)  # Start main script
  File "plip/plipcmd.py", line 171, in main
    process_pdb(pdbpath, config.OUTPATH, outputprefix=outputprefix)
  File "plip/plipcmd.py", line 66, in process_pdb
    mol.characterize_complex(ligand)
  File "/scicore/home/schwede/zohixe92/projects/plip/plip/modules/preparation.py", line 1439, in characterize_complex
    pli_obj = PLInteraction(lig_obj, bs_obj, self)
  File "/scicore/home/schwede/zohixe92/projects/plip/plip/modules/preparation.py", line 628, in __init__
    self.water_bridges = self.refine_water_bridges(self.water_bridges, self.hbonds_ldon, self.hbonds_pdon)
  File "/scicore/home/schwede/zohixe92/projects/plip/plip/modules/preparation.py", line 865, in refine_water_bridges
    wb_dict2[water] = sorted(wb_dict2[water])
TypeError: '<' not supported between instances of 'Atom' and 'Atom'

This affects apparently a lot of entries from the PDB, a quick stats from our side indicates around 30% of new entries. To cite a few: 3EMS, 4CUM, 5DDR, 1D7P, 6R79.

Include API in dockerized PLIP

Is your feature request related to a problem? Please describe.
To try out or to deploy PLIP within a microservice architecture, it would be helpful to have an existing API already running as a service inside the dockerized version of PLIP.

Describe the solution you'd like
Offer all command line functionality, including batch processing, inside an API shipped with dockerized PLIP. A modern, self-documenting API framework such as FastAPI would be nice.

Describe alternatives you've considered
Offer a limited set of basic functionality first and/or choose another API framework.

Additional context
Having the results in JSON format (see #76) should be solved first.

Results as JSON

Is your feature request related to a problem? Please describe.
The standard XML result format of PLIP leads to large result files and makes more difficult to readily integrate the tool into existing microservice architectures.

Describe the solution you'd like
Change the default output format of PLIP to JSON.

Describe alternatives you've considered
Offer it as an alternative output format.

Additional context

python modules PLIP is unable to import pybel & openbabel with OB 3.x

i think this should be a little bug.
In the "supplemental.py" and "detection.py" scripts, the way to import pybel & openbabel is wrong.
see https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#python-module
It should be like:

# External libraries
# import pybel
from openbabel import pybel
# from pybel import *
from openbabel.pybel import *
# from openbabel import *
from openbabel.openbabel import *

good wish!

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.