Skip to content

Commit

Permalink
Merge pull request #86 from openforcefield/topology
Browse files Browse the repository at this point in the history
Merge in preliminary RDKit support in preparation for 0.2.0 release.
  • Loading branch information
j-wags committed Apr 7, 2019
2 parents f63ddbc + 1143697 commit e3606e3
Show file tree
Hide file tree
Showing 209 changed files with 125,887 additions and 74,376 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ docs/_build/
# PyBuilder
target/

# PyCharm
*.idea/vcs.xml

# Ipython notebook checkpoints
*.ipynb_checkpoints/

Expand Down
132 changes: 88 additions & 44 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,101 @@
language: python
sudo: false

# Run jobs on container-based infrastructure, can be overridden per job
dist: xenial

# Run builds for both master and topology (and PRs to each)
branches:
only:
- master
- master
- topology

install:
- source devtools/travis-ci/install.sh
- export PYTHONUNBUFFERED=true
matrix:
include:
# Test osx with RDKit
- os: osx
language: generic
env: PYTHON_VER=3.6 RDKIT=true
- os: osx
language: generic
env: PYTHON_VER=3.7 RDKIT=true

# Test RDKit compatibility
- os: linux
python: 3.6
env: PYTHON_VER=3.6 RDKIT=true
- os: linux
python: 3.7
sudo: required
env: PYTHON_VER=3.7 RDKIT=true

# Test OpenEye compatibility
- os: linux
python: 3.6
env: PYTHON_VER=3.6 OPENEYE=true
- os: linux
sudo: required
python: 3.7
env: PYTHON_VER=3.7 OPENEYE=true

# Test case where both OpenEye and RDKit are installed
- os: linux
python: 3.6
env: PYTHON_VER=3.6 OPENEYE=true RDKIT=true
- os: linux
sudo: required
python: 3.7
env: PYTHON_VER=3.7 OPENEYE=true RDKIT=true

env:
global:
- OE_LICENSE="$HOME/oe_license.txt"

before_install:
# Additional info about the build
- uname -a
- df -h
- ulimit -a

# Install the Python environemt
- source devtools/travis-ci/before_install.sh
- python -V
# Unpack encrypted OpenEye license file
- if [ "$TRAVIS_SECURE_ENV_VARS" == true ]; then openssl aes-256-cbc -K $encrypted_a4fdffb2b55a_key -iv $encrypted_a4fdffb2b55a_iv -in oe_license.txt.enc -out $OE_LICENSE -d; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == false ]; then echo "OpenEye license will not be installed in forks."; fi
- if [[ "$OPENEYE" == true && "$TRAVIS_SECURE_ENV_VARS" == false ]]; then echo "OpenEye license will not be installed in forks."; fi

script:
# Add omnia and conda-forge channel
- conda config --add channels ${ORGNAME}
- conda config --add channels conda-forge
# Create and activate test environment
- conda create --yes -n test python=$python
install:
# Create test environment for package
- conda create -n test python=$PYTHON_VER pip pytest pytest-cov nbval
- source activate test
# Install OpenEye toolkit
#- pip install $OPENEYE_CHANNEL openeye-toolkits && python -c "import openeye; print(openeye.__version__)"

# TODO: Do we still need the beta version or can we do simply -c openeye openeye-toolkits?
# Use beta version for partial bond orders
- pip install --pre -i https://pypi.anaconda.org/openeye/simple openeye-toolkits && python -c "import openeye; print(openeye.__version__)"
# TODO: Reactivate conda install instead of pip install once OpenEye is released for python 3.7 on conda-forge.
# - if [[ "$OPENEYE" == true ]]; then conda install --yes -c openeye/label/Orion openeye-toolkits oeommtools && python -c "import openeye; print(openeye.__version__)"; fi

# Install RDKit
- conda install --yes -c rdkit rdkit
# Build the recipe
- conda build devtools/conda-recipe
# Use oeommtools for improper test
- conda install --yes -c openeye/label/Orion oeommtools -c omnia
# Install
- conda install --yes --use-local openforcefield
# Run tests
- conda install --yes nose nose-timer
- cd devtools && nosetests -vv --nocapture --with-timer $PACKAGENAME && cd ..
- if [[ "$RDKIT" == true ]]; then conda install --yes -c rdkit rdkit; fi
- if [[ "$RDKIT" == true ]]; then conda install --yes -c omnia ambertools; fi

env:
matrix:
- python=3.5 CONDA_PY=35
- python=3.6 CONDA_PY=36
# Install pip only modules
- pip install codecov
- pip install coverage==4.4
# TODO: Go back to conda install once OpenEye is released for python 3.7 on conda-forge.
- pip install -i https://pypi.anaconda.org/openeye/simple openeye-toolkits

global:
- ORGNAME="omnia"
- PACKAGENAME="openforcefield"
# OpenEye toolkit
- OE_LICENSE="$HOME/oe_license.txt"
- OPENEYE_CHANNEL="-i https://pypi.anaconda.org/openeye/channel/main/simple"
# encrypted BINSTAR_TOKEN for push of dev package to binstar
- secure: "Iw2yv40ElSbS/TstXS9YnsbJFbxsbFQ25fkWlq8H/O3SPJwpX2/PRoCo99R1Scc0mO9BiVMwGDJQeM9y1VoYo3ozv5SIhPvc+0cMOE3AzkRiFEpZeTtDUTxOWsb+k/x5dH5/AapXRtJeKhY3cWe3lhKdv9N+yWrhY29lawXgfU4WsOEl6ON9BPwwPzvKK1sP4z8kIMzDNjt6gJ3m1HzdEQe/ibrOJIEk6Z4kTLQo9z4F9dm73/L4scEgnW6SOACC39nuYCL8PK4zPNKTqpAoVkm18uyrRz62+qPYSl3RCBNOFtbAuz7fz+ShSMA6g//LpAobNptpQeQpWXkHhYk5ALc6xzH2zScVgrPytKAPwi8mYKq9gYZnUPYgpOdjK3bNyfkGjeV9I4sQwNCBYlKtGHoqZ1l+l6oYsbx+Ti+nIeK67ufGmAugH4GJ3dhZvP6ZR73/irOrvSWiJJgqI1/k4c9Ela4wDpQHDp9sRf03HgSrRTX2gQ3E/JmPx8s56tMdkmrIDIgy6Edc80AN6zEKX0+3YVGcH6ltUViDidRGDlZ7xbUUXYtjqMJXuJEh2SV/wbeVmrBM8Pn+IfsBzLKnd1jqe3pXfoCqbCtvNwW8Sr4qMgWBEHvEtB4C5KvO5CydmRx95q/0ziRGb/VEV6QOnGxT7EIJDfyQeUqNqJD7Bdo="
# encrypted AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
#- secure: "SrSd1JoI8dBXQxDAX0xBTYBinTusRBQoPETnxHrBAgKdoty1pkzaghTKNMsrGsk78iwkkj1hAyttIY9trdFQkmx+OTx0fLKFmDHsMkgko4RzTtrgLgoxuRIs/gruID2cN1XKEbxlhRmQF14+q8/X1q6iGGdYMrxo51JcYPuEOSo="
#- secure: "br6QRMYXhHltYTEh/d+zejxcunT3GsqwQvxxLmqnLxi+LIxX4j7eymR6p4fPBd5mCRxyvkQEjnSZxF6e7JlEKxWVcMG28I/dBWzVIRW3EKQQNRmyI+JL1dfNaqj68kHJD+FknBwHK9LD238JPcyqXPdVrm9iPkDijPczvPBxvDs="

#after_success:
# - echo "after_success"
# - if [ "$TRAVIS_SECURE_ENV_VARS" == true ]; then ./devtools/travis-ci/after_success.sh; fi
# Build and install package
- conda build --python=$PYTHON_VER devtools/conda-recipe
- conda install --use-local openforcefield

script:
# Run doctests only if both RDKit and OpenEye are installed.
- if [[ "$RDKIT" == true && "$OPENEYE" == true ]];
then pytest -v --ignore=utilities --ignore=examples/deprecated --ignore=docs --doctest-modules --nbval-lax --cov=openforcefield;
else pytest -v --ignore=utilities --ignore=examples/deprecated --nbval-lax --cov=openforcefield;
fi

notifications:
email: false

after_success:
- codecov
6 changes: 4 additions & 2 deletions Chemical-starting-points.md → FAQ.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Appropriate starting points for applying a SMIRNOFF
# Frequently asked questions (FAQ)

## Input files for applying SMIRNOFF parameters

SMIRNOFF force fields use direct chemical perception meaning that, unlike many molecular mechanics (MM) force fields, they apply parameters based on substructure searches acting directly on molecules.
This creates unique opportunities and allows them to encode a great deal of chemistry quite simply, but it also means that the *starting point* for parameter assignment must be well-defined chemically, giving not just the elements and connectivity for all of the atoms of all of the components of your system, but also providing the formal charges and bond orders.

Specifically, to apply SMIRNOFF to a system, you must either:
1. Provide molecules (currently `OEMol` objects, but an RDKit version is in development) corresponding to the components of your system, or
1. Provide Open Force Field Toolkit `Molecule` objects corresponding to the components of your system, or
2. Provide an OpenMM `Topology` which includes bond orders and thus can be converted to molecules corresponding to the components of your system

Without this information, our direct chemical perception cannot be applied to your molecule, as it requires the chemical identity of the molecules in your system -- that is, bond order and formal charge as well as atoms and connectivity.
Expand Down
12 changes: 11 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
Copyright (c) 2016, Open Forcefield Group
This software is distributed under the MIT License.

More information on this license can be found at the Open Source Initiative

https://opensource.org/licenses/MIT

The complete license text is reproduced below:

---

Copyright (c) 2016-2018, Open Force Field Initiative

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit e3606e3

Please sign in to comment.