Commit 22ad5fc9 authored by ZHENQIN WU's avatar ZHENQIN WU
Browse files

Merge remote-tracking branch 'remotes/origin/master' into MPNN

parents 6d903dee 7dec6843
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -5,9 +5,7 @@ python:
sudo: required
dist: trusty
install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then wget https://repo.continuum.io/archive/Anaconda2-4.3.0-Linux-x86_64.sh
  -O anaconda.sh; else wget https://repo.continuum.io/archive/Anaconda3-4.3.0-Linux-x86_64.sh
  -O anaconda.sh; fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O anaconda.sh;
- export python_version=$TRAVIS_PYTHON_VERSION
- bash anaconda.sh -b -p $HOME/anaconda
- export PATH="$HOME/anaconda/bin:$PATH"
@@ -17,7 +15,7 @@ install:
- conda config --add channels http://conda.binstar.org/omnia
- bash scripts/install_deepchem_conda.sh deepchem
- source activate deepchem
- pip install yapf==0.16.2
- pip install yapf==0.17.0
- pip install coveralls
- python setup.py install
script:
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ DeepChem understands and agrees that Contributor retains copyright in its Contri
DeepChem uses [yapf](https://github.com/google/yapf) to autoformat code.

``` bash
pip install yapf==0.16.2
pip install yapf==0.17.0
cd <git_root>
yapf -i <python_files changed>
```
+3 −3
Original line number Diff line number Diff line
@@ -773,15 +773,15 @@ DeepChem started as a [Pande group](https://pande.stanford.edu/) project at Stan
DeepChem is supported by a number of corporate partners who use DeepChem to solve interesting problems.

### Schrödinger
[![Schödinger](https://github.com/deepchem/deepchem/raw/master/docs/_static/schrodinger_logo.png)](https://www.schrodinger.com/)
[![Schödinger](https://github.com/deepchem/deepchem/blob/master/docs/source/_static/schrodinger_logo.png)](https://www.schrodinger.com/)

> DeepChem has transformed how we think about building QSAR and QSPR models when very large data sets are available; and we are actively using DeepChem to investigate how to best combine the power of deep learning with next generation physics-based scoring methods.

### DeepCrystal
<img src="https://raw.githubusercontent.com/deepchem/deepchem/master/docs/_static/deep_crystal_logo.png" alt="DeepCrystal Logo" height=150px/>
<img src="https://github.com/deepchem/deepchem/blob/master/docs/source/_static/deep_crystal_logo.png" alt="DeepCrystal Logo" height=150px/>

> DeepCrystal was an early adopter of DeepChem, which we now rely on to abstract away some of the hardest pieces of deep learning in drug discovery. By open sourcing these efficient implementations of chemically / biologically aware deep-learning systems, DeepChem puts the latest research into the hands of the scientists that need it, materially pushing forward the field of in-silico drug discovery in the process.


## Version
1.1.0
1.2.0
+12 −11
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ __copyright__ = "Copyright 2016, Stanford University"
__license__ = "MIT"

import sys
from deepchem.utils.dependencies import mdtraj as md
import unittest
import os
import numpy as np
@@ -86,8 +85,8 @@ class TestBindingPocket(unittest.TestCase):
    box2 = ((1, 3), (1, 3), (1, 3))
    mapping = {box1: [1, 2, 3, 4], box2: [1, 2, 3, 4, 5]}
    boxes = [box1, box2]
    merged_boxes, _ = dc.dock.binding_pocket.merge_overlapping_boxes(mapping,
                                                                     boxes)
    merged_boxes, _ = dc.dock.binding_pocket.merge_overlapping_boxes(
        mapping, boxes)
    print("merged_boxes")
    print(merged_boxes)
    assert len(merged_boxes) == 1
@@ -98,8 +97,8 @@ class TestBindingPocket(unittest.TestCase):
    box2 = ((1, 2), (1, 2), (1, 2))
    mapping = {box1: [1, 2, 3, 4, 5, 6], box2: [1, 2, 3, 4]}
    boxes = [box1, box2]
    merged_boxes, _ = dc.dock.binding_pocket.merge_overlapping_boxes(mapping,
                                                                     boxes)
    merged_boxes, _ = dc.dock.binding_pocket.merge_overlapping_boxes(
        mapping, boxes)
    print("merged_boxes")
    print(merged_boxes)
    assert len(merged_boxes) == 1
@@ -114,8 +113,8 @@ class TestBindingPocket(unittest.TestCase):
        box2: [1, 2, 3, 4],
        box3: [1, 2, 3, 4, 5]
    }
    merged_boxes, _ = dc.dock.binding_pocket.merge_overlapping_boxes(mapping,
                                                                     boxes)
    merged_boxes, _ = dc.dock.binding_pocket.merge_overlapping_boxes(
        mapping, boxes)
    print("merged_boxes")
    print(merged_boxes)
    assert len(merged_boxes) == 1
@@ -127,12 +126,13 @@ class TestBindingPocket(unittest.TestCase):
    protein_file = os.path.join(current_dir, "1jld_protein.pdb")
    ligand_file = os.path.join(current_dir, "1jld_ligand.sdf")

    import mdtraj as md
    protein = md.load(protein_file)

    finder = dc.dock.ConvexHullPocketFinder()
    all_pockets = finder.find_all_pockets(protein_file)
    pockets, pocket_atoms_map, pocket_coords = finder.find_pockets(protein_file,
                                                                   ligand_file)
    pockets, pocket_atoms_map, pocket_coords = finder.find_pockets(
        protein_file, ligand_file)
    # Test that every atom in pocket maps exists
    n_protein_atoms = protein.xyz.shape[1]
    print("protein.xyz.shape")
@@ -158,11 +158,12 @@ class TestBindingPocket(unittest.TestCase):
    protein_file = os.path.join(current_dir, "1jld_protein.pdb")
    ligand_file = os.path.join(current_dir, "1jld_ligand.sdf")

    import mdtraj as md
    protein = md.load(protein_file)

    finder = dc.dock.RFConvexHullPocketFinder()
    pockets, pocket_atoms_map, pocket_coords = finder.find_pockets(protein_file,
                                                                   ligand_file)
    pockets, pocket_atoms_map, pocket_coords = finder.find_pockets(
        protein_file, ligand_file)
    # Test that every atom in pocket maps exists
    n_protein_atoms = protein.xyz.shape[1]
    print("protein.xyz.shape")
+4 −3
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ __copyright__ = "Copyright 2016, Stanford University"
__license__ = "LGPL v2.1+"

import numpy as np
from deepchem.utils.dependencies import mdtraj
from deepchem.feat import Featurizer
from deepchem.feat import ComplexFeaturizer
from deepchem.utils import rdkit_util, pad_array
@@ -56,6 +55,7 @@ def compute_neighbor_list(coords, neighbor_cutoff, max_num_neighbors,
                          periodic_box_size):
  """Computes a neighbor list from atom coordinates."""
  N = coords.shape[0]
  import mdtraj
  traj = mdtraj.Trajectory(coords.reshape((1, N, 3)), None)
  box_size = None
  if periodic_box_size is not None:
@@ -73,8 +73,9 @@ def compute_neighbor_list(coords, neighbor_cutoff, max_num_neighbors,
      dist = np.linalg.norm(delta, axis=1)
      sorted_neighbors = list(zip(dist, neighbors[i]))
      sorted_neighbors.sort()
      neighbor_list[
          i] = [sorted_neighbors[j][1] for j in range(max_num_neighbors)]
      neighbor_list[i] = [
          sorted_neighbors[j][1] for j in range(max_num_neighbors)
      ]
    else:
      neighbor_list[i] = list(neighbors[i])
  return neighbor_list
Loading