Skip to content

zhenglz/deepunion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepunion: A collection of drug discovery tools for ligand preparation, featurization and docking.

Installation

Install anaconda first.

$ conda create -name docking python=3.6
$ source activate docking

Before you install deepunion, you may need to have numpy, pandas, rdkit and pubchempy install

$ conda install pandas numpy
$ pip install pubchempy
$ conda install -c rdkit rdkit
$ conda install -c omnia mdtraj

Then, download the package and install

$ git clone http://github.com/zhenglz/deepunion.git
$ cd deepunion 
$ pip install -e ./

Quick start

1 Convert a molecule to a pdb file, given its smile code

>>> # generate 3D conformation from a SMILE code and 
>>> # save as a pdb file
>>> from deepunion import builder
>>> comp = builder.CompoundBuilder(out_format="pdb", in_format="smile")
>>> comp.in_format
'smile'
>>> comp.load_mol("CCCC")
<deepunion.builder.CompoundBuilder object at 0x7f0cd1d909b0>
>>> comp.generate_conformer()
<deepunion.builder.CompoundBuilder object at 0x7f0cd1d909b0>
>>> comp.write_mol("mol_CCCC.pdb")
<deepunion.builder.CompoundBuilder object at 0x7f0cd1d909b0>
>>> # the molecule has been saved to mol_CCCC.pdb in working directory
>>> # convert the pdb file into a pdbqt file
>>> babel_converter("mol_CCCC.pdb", "mol_CCCC.pdbqt")

2 Search a molecule "progesterone" from pubchem, add hydrogen atoms and optimize the structure and save the 3D coordinates into a pdb file.

>>> # download progesterone and save it into a pdb file
>>> from deepunion import downloader
>>> down = downloader.PubChemDownloader()
>>> m = down.get_compound("progesterone", type="name")
>>> smile = down.get_smile(m)
>>> # now convert SMILE to pdb
>>> from deepunion import builder
>>> b = builder.CompoundBuilder("pdb", "smile")
>>> b.load_mol(smile)
>>> b.generate_conformer()
>>> b.write_mol("progesterone.pdb")

Examples

Go to the deepunion/deepunion/test folder, explore the scripts to generate PDB files from a list of smile file.

About

A collection of drug discovery tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages