Commit 570a3be6 authored by Zheng Xu's avatar Zheng Xu
Browse files

Merge remote-tracking branch 'origin/master' into new_bm_design

parents 65cada4c 367bea14
Loading
Loading
Loading
Loading

CONTRIBUTING.md

0 → 100644
+34 −0
Original line number Diff line number Diff line
# DeepChem

## Contributing to DeepChem

We actively encourage community contributions to DeepChem. The first place to start getting involved is by running our examples locally. Afterwards, we encourage contributors to give a shot to improving our documentation. While we take effort to provide good docs, there's plenty of room for improvement. All docs are hosted on Github, either in `README.md` file, or in the `docs/` directory.

Once you've got a sense of how the package works, we encourage the use of Github issues to discuss more complex changes,  raise requests for new features or propose changes to the global architecture of DeepChem. Once consensus is reached on the issue, please submit a PR with proposed modifications. All contributed code to DeepChem will be reviewed by a member of the DeepChem team, so please make sure your code style and documentation style match our guidelines!

## Contributor License Agreement
In order to get a pull request accepted you must fill out our [License Agreement](https://www.clahub.com/agreements/lilleswing/deepchem).  The purpose of this agreement is to enable DeepChem to distribute your code and its derivatives.

### The Agreement
Contributor offers to license certain software (a “Contribution” or multiple “Contributions”) to DeepChem, and DeepChem agrees to accept said Contributions, under the terms of the open source license [The MIT License](https://opensource.org/licenses/MIT)


The Contributor understands and agrees that DeepChem shall have the irrevocable and perpetual right to make and distribute copies of any Contribution, as well as to create and distribute collective works and derivative works of any Contribution, under [The MIT License](https://opensource.org/licenses/MIT).


DeepChem understands and agrees that Contributor retains copyright in its Contributions. Nothing in this Contributor Agreement shall be interpreted to prohibit Contributor from licensing its Contributions under different terms from the [The MIT License](https://opensource.org/licenses/MIT) or this Contributor Agreement.

### Code Style Guidelines
DeepChem uses [yapf](https://github.com/google/yapf) to autoformat code.

``` bash
pip install yapf==0.16.0
cd <git_root>
yapf -i <python_files changed>
```

Our integration tests will fail if code is not formatted correctly

### Documentation Style Guidelines
DeepChem uses [NumPy style documentation](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt). Please follow these conventions when documenting code, since we use [Sphinx+Napoleon](http://www.sphinx-doc.org/en/stable/ext/napoleon.html) to automatically generate docs on [deepchem.io](deepchem.io).

Dockerfile

0 → 100644
+35 −0
Original line number Diff line number Diff line
FROM nvidia/cuda

# Install some utilities
RUN apt-get update && \
    apt-get install -y -q wget git libxrender1 && \
    apt-get clean

# Install miniconda
RUN MINICONDA="Miniconda2-latest-Linux-x86_64.sh" && \
    wget --quiet https://repo.continuum.io/miniconda/$MINICONDA && \
    bash $MINICONDA -b -p /miniconda && \
    rm -f $MINICONDA
ENV PATH /miniconda/bin:$PATH

# Install deepchem conda package from omnia
# TODO: Uncomment this when there is a stable release of deepchem.
#RUN conda config --add channels omnia
#RUN conda install --yes deepchem

# Install deepchem with GPU support from github using Tue 14 Mar 2017 git head
# TODO: Get rid of this when there is a stable release of deepchem.
RUN git clone https://github.com/deepchem/deepchem.git && \
    cd deepchem && \
    git checkout 415aebadff54175b7ba108964723c8f69438af94 && \
    bash scripts/install_deepchem_conda.sh root && \
    pip install tensorflow-gpu==0.12.1 && \
    python setup.py develop

# Clean up
RUN cd deepchem && \
    git clean -fX

# Run tests
#RUN pip install nose && \
#    nosetests -v deepchem --nologcapture

LICENSE

100644 → 100755
+4 −524

File changed.File mode changed from 100644 to 100755.

Preview size limit exceeded, changes collapsed.

+43 −42
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ Stanford and originally created by [Bharath Ramsundar](http://rbharath.github.io
* [About Us](#about-us)
    
## Requirements
* [openbabel](http://openbabel.org/wiki/Main_Page)
* [pandas](http://pandas.pydata.org/)
* [rdkit](http://www.rdkit.org/docs/Install.html)
* [boost](http://www.boost.org/)
@@ -40,31 +39,46 @@ Stanford and originally created by [Bharath Ramsundar](http://rbharath.github.io

Installation from source is the only currently supported format. ```deepchem``` currently supports both Python 2.7 and Python 3.5, but is not supported on any OS'es except 64 bit linux. Please make sure you follow the directions below precisely. While you may already have system versions of some of these packages, there is no guarantee that `deepchem` will work with alternate versions than those specified below.

### Full Anaconda distribution

1. Download the **64-bit** Python 2.7 or Python 3.5 versions of Anaconda for linux [here](https://www.continuum.io/downloads#_unix). 
   
   Follow the [installation instructions](http://docs.continuum.io/anaconda/install#linux-install)
### Using a conda environment
You can install deepchem in a new conda environment using the conda commands in scripts/install_deepchem_conda.sh

2. `openbabel`
```bash
   conda install -c omnia openbabel=2.4.0
bash scripts/install_deepchem_conda.sh deepchem
pip install tensorflow-gpu==0.12.1                      # If you want GPU support
git clone https://github.com/deepchem/deepchem.git      # Clone deepchem source code from GitHub
cd deepchem
python setup.py install                                 # Manual install
nosetests -v deepchem --nologcapture                    # Run tests
```
This creates a new conda environment `deepchem` and installs in it the dependencies that
are needed. To access it, use the `source activate deepchem` command.
Check [this link](https://conda.io/docs/using/envs.html) for more information about
the benefits and usage of conda environments. **Warning**: Segmentation faults can [still happen](https://github.com/deepchem/deepchem/pull/379#issuecomment-277013514)
via this installation procedure.

### Installing Dependencies Manually

3. `rdkit`
1. Download the **64-bit** Python 2.7 or Python 3.5 versions of Anaconda for linux [here](https://www.continuum.io/downloads#_unix). 
   Follow the [installation instructions](http://docs.continuum.io/anaconda/install#linux-install)

2. `rdkit`
   ```bash
   conda install -c rdkit rdkit
   ```

4. `joblib`
3. `joblib`
   ```bash
   conda install joblib 
   ```

5. `six`
4. `six`
   ```bash
   pip install six
   ```
5. `networkx`
   ```bash
   conda install -c anaconda networkx=1.11
   ```

6. `mdtraj`
   ```bash
@@ -111,22 +125,25 @@ Installation from source is the only currently supported format. ```deepchem```
    Note that the full test-suite uses up a fair amount of memory. 
    Try running tests for one submodule at a time if memory proves an issue.

### Using a conda environment
Alternatively, you can install deepchem in a new conda environment using the conda commands in scripts/install_deepchem_conda.sh

### Using a Docker Image
For major releases we will create docker environments with everything pre-installed
``` bash
bash scripts/install_deepchem_conda.sh deepchem
pip install tensorflow-gpu==0.12.1                      # If you want GPU support
git clone https://github.com/deepchem/deepchem.git      # Clone deepchem source code from GitHub
cd deepchem
python setup.py install                                 # Manual install
nosetests -v deepchem --nologcapture                    # Run tests
# This will the download the latest stable deepchem docker image into your images
docker pull deepchemio/deepchem

# This will create a container out of our latest image
docker run -i -t deepchemio/deepchem

# You are now in a docker container whose python has deepchem installed
# For example you can run our tox21 benchmark
cd deepchem/examples
python benchmark.py -d tox21

# Or you can start playing with it in the command line
pip install jupyter
ipython
import deepchem as dc
```
This creates a new conda environment `deepchem` and installs in it the dependencies that
are needed. To access it, use the `source activate deepchem` command.
Check [this link](https://conda.io/docs/using/envs.html) for more information about
the benefits and usage of conda environments. **Warning**: Segmentation faults can [still happen](https://github.com/deepchem/deepchem/pull/379#issuecomment-277013514)
via this installation procedure.

## FAQ
1. Question: I'm seeing some failures in my test suite having to do with MKL
@@ -454,22 +471,6 @@ Time needed for benchmark test(~20h in total)
|kaggle          |MT-NN regression    |2200            |3200           |


## Contributing to DeepChem

We actively encourage community contributions to DeepChem. The first place to start getting involved is by running our examples locally. Afterwards, we encourage contributors to give a shot to improving our documentation. While we take effort to provide good docs, there's plenty of room for improvement. All docs are hosted on Github, either in this `README.md` file, or in the `docs/` directory.

Once you've got a sense of how the package works, we encourage the use of Github issues to discuss more complex changes,  raise requests for new features or propose changes to the global architecture of DeepChem. Once consensus is reached on the issue, please submit a PR with proposed modifications. All contributed code to DeepChem will be reviewed by a member of the DeepChem team, so please make sure your code style and documentation style match our guidelines!

### Code Style Guidelines
DeepChem uses [yapf](https://github.com/google/yapf) to autoformat code.  We created a git pre-commit hook to make this process easier.

``` bash
cp devtools/travis-ci/pre-commit .git/hooks
pip install yapf==0.16.0
```

### Documentation Style Guidelines
DeepChem uses [NumPy style documentation](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt). Please follow these conventions when documenting code, since we use [Sphinx+Napoleon](http://www.sphinx-doc.org/en/stable/ext/napoleon.html) to automatically generate docs on [deepchem.io](deepchem.io).

### Gitter
Join us on gitter at [https://gitter.im/deepchem/Lobby](https://gitter.im/deepchem/Lobby). Probably the easiest place to ask simple questions or float requests for new features.
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ import shutil

__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
__license__ = "MIT"


def sparsify_features(X):
Loading