Skip to content

Commit

Permalink
Merge pull request #26 from choderalab/travis
Browse files Browse the repository at this point in the history
Add travis continuous integration
  • Loading branch information
jchodera authored Jun 30, 2017
2 parents fb72a10 + 9c6ff24 commit fa96a03
Show file tree
Hide file tree
Showing 18 changed files with 91,877 additions and 91,579 deletions.
55 changes: 55 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
language: c
sudo: false

branches:
only:
- master

install:
- source devtools/travis-ci/install.sh
- export PYTHONUNBUFFERED=true
# Add org channel
- conda config --add channels ${ORGNAME}

script:
# Create a test environment
- conda create --yes -n test python=$python
# Activate the test environment
- source activate test
# Add conda channels, using old priority scheme where most recent versions win
- conda config --set channel_priority false
- conda config --add channels conda-forge
- conda config --add channels omnia
- conda config --add channels https://conda.anaconda.org/omnia/label/dev
# Install extras for testing
- conda install --yes --quiet pip nose nose-timer
# Build the recipe
- echo "Building the recipe..."
- conda build devtools/conda-recipe
# Install the package
- echo "Installing the ${PACKAGENAME} package..."
- conda install --yes --use-local ${PACKAGENAME}
# Test the openmmforcefields package to make sure installed ffxml files are working
- echo "Testing the installed openmmforcefields ffxml files..."
- cd devtools && nosetests ${PACKAGENAME}.tests.test_amber_import --nocapture --verbosity=2 --with-timer -a '!slow' && cd ..
# Test AMBER conversion
- conda install --yes --quiet parmed yaml
- echo "Testing AMBER conversion..."
- cd amber && python convert_amber.py && cd ..
# Test CHARMM conversion
- echo "Testing CHARMM conversion..."
- cd charmm && python convert_charmm.py && cd ..

os:
- osx
- linux

env:
matrix:
- python=2.7 CONDA_PY=2.7
- python=3.5 CONDA_PY=3.5
- python=3.5 CONDA_PY=3.6

global:
- ORGNAME="omnia"
- PACKAGENAME="openmmforcefields"
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
MIT License

Copyright (c) 2016 Chodera lab // Memorial Sloan Kettering Cancer Center
Copyright (c) 2016-2017 by
Chodera lab // Memorial Sloan Kettering Cancer Center
Pande group // Stanford University

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
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# openmm-forcefields
CHARMM and AMBER forcefields for OpenMM
[![Build Status](https://travis-ci.org/choderalab/openmm-forcefields.svg?branch=master)](https://travis-ci.org/choderalab/openmm-forcefields?branch=master)

# CHARMM and AMBER forcefields for OpenMM

Conversion tools for and repository of CHARMM and AMBER forcefields for OpenMM.

## Manifest

* `charmm/` - CHARMM forcefield conversion tools
* `amber/` - AMBER forcefield conversion tools
14 changes: 7 additions & 7 deletions amber/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

**General**

Script supports command line arguments, and so `python amber2omm.py -h`:
Script supports command line arguments, and so `python convert_amber.py -h`:
```
usage: amber2omm.py [-h] [--input INPUT] [--input-format INPUT_FORMAT]
[--verbose] [--no-log] [--protein-test] [--nucleic-test]
[--protein-ua-test] [--phospho-protein-test] [--gaff-test]
usage: convert_amber.py [-h] [--input INPUT] [--input-format INPUT_FORMAT]
[--verbose] [--no-log] [--protein-test] [--nucleic-test]
[--protein-ua-test] [--phospho-protein-test] [--gaff-test]
AMBER --> OpenMM forcefield conversion script
Expand All @@ -32,7 +32,7 @@ optional arguments:
test
```

With the defaults as set, all you need to do is have the script and the `files/` directory and call `python amber2omm.py`. `-v` or `--no-log` as wanted.
With the defaults as set, all you need to do is have the script and the `files/` directory and call `python convert_amber.py`. `-v` or `--no-log` as wanted.

Output:
* `ffxml/` with all output XMLs
Expand Down Expand Up @@ -158,14 +158,14 @@ An 'overloading' set: HFE +2, +3 and +4 ions for tip3p water.

Should you want to provide a different YAML (shorter version, different completely, whatever you want), script will take it with:
```
python amber2omm.py --input name_of_your_yaml.yaml
python convert_amber.py --input name_of_your_yaml.yaml
```

The outputs of any YAML will be written to `ffxml/`.

You can also provide a leaprc of your choosing via:
```
python amber2omm.py --input name_of_your_leaprc --input-format leaprc
python convert_amber.py --input name_of_your_leaprc --input-format leaprc
```

The output of any leaprc will be written to the `./`.
Expand Down
File renamed without changes.
33 changes: 16 additions & 17 deletions charmm/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
This directory contains files and scripts needed to convert the CHARMM forcefield to ffxml files
# CHARMM forcefield conversion tools for OpenMM

## Manifest
* ```toppar/``` - All files taken and unzipped from (http://mackerell.umaryland.edu/charmm_ff.html) Jan 2016.
* ```ffxml/``` - charmm36 ffxml
* ```charmm36.yaml``` - yaml file needed for convert_charmm.py script. Specifies files to include and exclude.
* ```convert_charmm.py``` - script to convert charmm top and par files to ffxml.

### Dependencies
* ParmEd
This directory contains files and scripts needed to convert the CHARMM forcefield to OpenMM `ffxml` files

---

Notes on files that were excluded from conversion.
## Manifest
* `toppar/` - CHARMM36 `toppar` files taken and unzipped from (http://mackerell.umaryland.edu/charmm_ff.html) Jan 2016.
* `ffxml/` - converted OpenMM `ffxml` files for CHARMM36
* `charmm36.yaml` - yaml input file needed to drive bundling by `convert_charmm.py`
* `convert_charmm.py` - script to convert CHARMM `top` and `par` files to `ffxml`

There are two glycolipid stream files with duplicate dihedrals with different values. According to discussion with
Alex MacKerell, the carb glycolipid file should be used so the lipid glycolipid stream file was excluded.
## Dependencies
* [`ParmEd`](https://github.com/parmed/parmed) - for parameter/topology conversion

```toppar_all36_prot_aldehydes.str``` and ```toppar_all36_na_modifications.str``` have different values for the angle of
atom types O CD CT2. These files should not be used in the same system so both were excluded. A new atom type is needed
to correct this. If needed, CGenFF can be used for aldehydes or the user can convert these files at their own risk.
## Notes

Notes on files that were excluded from conversion:

* There are two glycolipid stream files with duplicate dihedrals with different values.
According to discussion with Alex MacKerell, the carb glycolipid file should be used so the lipid glycolipid stream file was excluded.
* `toppar_all36_prot_aldehydes.str` and `toppar_all36_na_modifications.str` have different values for the angle of atom types O CD CT2.
These files should not be used in the same system so both were excluded. A new atom type is needed to correct this.
If needed, [CGenFF](https://cgenff.paramchem.org/) can be used for aldehydes or the user can convert these files at their own risk.
4 changes: 1 addition & 3 deletions charmm/convert_charmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
source.append(OrderedDict())
source[-1]['Source'] = fi
md5 = hashlib.md5()
with open(fi) as f:
with open(fi, 'rb') as f:
md5.update(f.read())
md5 = md5.hexdigest()
source[-1]['md5hash'] = md5
Expand All @@ -64,5 +64,3 @@
params = CharmmParameterSet(*charmm_files)
params_omm = openmm.OpenMMParameterSet.from_parameterset(params)
params_omm.write('ffxml/charmm36.xml', provenance=provenance)


Loading

0 comments on commit fa96a03

Please sign in to comment.