Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Doerr committed Feb 1, 2017
2 parents 933f4f5 + 501d8ce commit fab84a3
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 25 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ matrix:
- brew install gcc

install:
- printenv
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
Expand All @@ -45,9 +44,9 @@ install:
# - source activate travis-env

- conda config --add channels acellera
- conda install -c acellera toolz=0.8.0 -y -q
- conda install -c acellera toolz=0.8.0 -y -q
- conda update --all -y -q
- conda install anaconda requests conda-build -y -q
- conda install anaconda anaconda-client requests conda-build -y -q


- if [ "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then export BUILD_VERSION=$TRAVIS_TAG; else export BUILD_VERSION=0.0.0; fi
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-include htmd/data *
recursive-include htmd/lib *
include HTMD_LICENSE.txt
4 changes: 4 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HTMD
See https://www.htmd.org
Installation through PyPI is experimental -- please report bugs via
https://github.org/acellera/htmd/issues
12 changes: 6 additions & 6 deletions htmd/adaptive/adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ def run(self):
except ProjectNotExistError:
logger.info('Retrieve found no previous simulations for this adaptive. Assuming this is a new adaptive run')

if epoch >= self.nepochs:
logger.info('Reached maximum number of epochs ' + str(self.nepochs))
self._unsetLock()
return

# Checking how many simulations are in progress (queued/running) on the queue
try:
self._running = self.app.inprogress()
Expand All @@ -95,8 +90,13 @@ def run(self):

logger.info(str(self._running) + ' simulations in progress')

if epoch >= self.nepochs and self._running == 0:
logger.info('Reached maximum number of epochs ' + str(self.nepochs))
self._unsetLock()
return

# If currently running simulations are lower than nmin start new ones to reach nmax number of sims
if self._running <= self.nmin:
if self._running <= self.nmin and epoch < self.nepochs:
flag = self._algorithm()
if flag is False:
self._unsetLock()
Expand Down
23 changes: 15 additions & 8 deletions htmd/apps/acemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Acemd(ProtocolInterface):
'coordinates': 'structure.pdb', 'velocities': 'velocity.pdb', 'consref': 'structure.pdb',
'parmfile': 'structure.prmtop'}

def __init__(self):
def __init__(self, version=2):
super().__init__()

self._version=version
self._files = {}

# Options
Expand All @@ -43,21 +43,26 @@ def __init__(self):
self._cmdString('pmegridspacing', 'str', '', None)
self._cmdString('fullelectfrequency', 'str', '', None)
self._cmdString('energyfreq', 'str', '', None)
self._cmdString('constraints', 'str', '', None)
self._cmdString('consref', 'str', '', None)
self._cmdString('constraintscaling', 'str', '', None)
if self._version == 2:
self._cmdString('constraints', 'str', '', None)
self._cmdString('consref', 'str', '', None)
self._cmdString('constraintscaling', 'str', '', None)
if self._version == 3:
self._cmdString('atomrestraint', 'str', '', None)
self._cmdString('grouprestraint', 'str', '', None)
self._cmdString('berendsenpressure', 'str', '', None)
self._cmdString('berendsenpressuretarget', 'str', '', None)
self._cmdString('berendsenpressurerelaxationtime', 'str', '', None)
self._cmdString('tclforces', 'str', '', None)
self._cmdString('minimize', 'str', '', None)
self._cmdString('run', 'str', '', None)
self._cmdString('TCL', 'str', '', None)
self._cmdString('celldimension', 'str', '', None)
self._cmdString('useconstantratio', 'str', '', None)
self._cmdString('amber', 'str', '', None)
self._cmdString('dielectric', 'str', '', None)
self._cmdString('pairlistdist', 'str', '', None)
if self._version == 2:
self._cmdString('TCL', 'str', '', None)

# Files
self._cmdString('bincoordinates', 'str', '', None)
Expand All @@ -68,7 +73,6 @@ def __init__(self):
self._cmdString('extendedsystem', 'str', '', None)
self._cmdString('coordinates', 'str', '', None)
self._cmdString('velocities', 'str', '', None)
self._cmdString('consref', 'str', '', None)
self._cmdString('parmfile', 'str', '', None)

def load(self, path='.'):
Expand Down Expand Up @@ -175,7 +179,10 @@ def show(self, quiet=False):

def _writeBashRun(self, fname):
with open(fname, 'w') as f:
f.write('#!/bin/bash\nacemd >log.txt 2>&1')
if self._version==3:
f.write('#!/bin/bash\nacemd3 >log.txt 2>&1')
else:
f.write('#!/bin/bash\nacemd >log.txt 2>&1')
os.chmod(fname, 0o700)

def __repr__(self):
Expand Down
1 change: 1 addition & 0 deletions htmd/builder/amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#
from __future__ import print_function


from htmd.home import home
import numpy as np
import os
Expand Down
37 changes: 37 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from setuptools import setup
import subprocess

version=subprocess.Popen(["git", "describe", "--tags"], stdout=subprocess.PIPE ).stdout.read().decode("utf8")
version=version.split("-")
version=version[0]

f=open( "package/htmd-deps/DEPENDENCIES", "r" )
deps=[ 'pyEMMA<2.3' ]
#for a in f.readlines():
# deps.append(a.strip().split("=")[0]) #.decode("utf8"))

print("Version [%s]" % (version) )
print("Dependencies:" )
print(deps)

setup(name='htmd',
version='0.15.11',
description='HTMD',
packages=['htmd', 'htmdx', 'htmd.molecule', 'htmd.parameterization', 'htmd.adaptive', 'htmd.apps', 'htmd.builder', 'htmd.clustering', 'htmd.progress', 'htmd.projections', 'htmd.protocols', 'htmd.qm', 'htmd.queues', 'htmd.data' ],
install_requires=deps,
zip_safe=False,
url="https://www.htmd.org",
maintainer="Acellera Ltd",
maintainer_email="[email protected]",
entry_points = {
"console_scripts": [
'htmdnb = htmdx.cli:main_htmd_notebook',
'htmd = htmdx.cli:main_htmd',
'htmd_register = htmdx.cli:main_do_nothing',
'parameterize = htmd.parameterization.cli:main_parameterize',
'activate_license = htmdx.cli:main_activate'
]
},
include_package_data=True
)

10 changes: 5 additions & 5 deletions sync_conda_with_omnia.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

acellera = {"latest_version": "0" }

if omnia["latest_version"] != acellera["latest_version"]:
print("Syncing %s/%s version %s.." %(pp[0], p, omnia["latest_version"]) )
if omnia["latest_version"] > acellera["latest_version"]:
print("Syncing %s/%s version %s (acellera version %s).." %(pp[0], p, omnia["latest_version"], acellera["latest_version"]) )
for f in omnia["files"]:
if f["version"] == omnia["latest_version"]:
url = "https:" + f["download_url"]
Expand All @@ -69,11 +69,11 @@
print("Uploading.." )
try:
os.getenv("ANACONDA_TOKEN_BASIC")
call([ "anaconda", "upload", "-t", os.getenv("ANACONDA_TOKEN_BASIC"),"-u", "acellera", f["basename"] ])
call([ "anaconda", "upload", "--force", "-t", os.getenv("ANACONDA_TOKEN_BASIC"),"-u", "acellera", f["basename"] ])
except:
try:
call([ "anaconda", "upload", "-u", "acellera", f["basename"] ])
call([ "anaconda", "upload", "--force", "-u", "acellera", f["basename"] ])
except:
print("Failed to sync")
else:
print("Package %s up to date at version %s" % ( p, omnia["latest_version"] ) )
print("Package %s up to date at version %s/%s" % ( p, omnia["latest_version"], acellera["latest_version"] ) )
4 changes: 1 addition & 3 deletions tests/run_inline_file_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
from subprocess import call, check_output
import sys

excludedfolders = ('./tests', './doc', './htmdlib')
excludedfiles = ('__init__.py', 'license_headers.py', 'sync_conda_with_omnia.py', 'makerelease.py') # Trailing comma needed otherwise it's not a tuple

excludedfiles = ('__init__.py', 'license_headers.py', 'setup.py', 'sync_conda_with_omnia.py', 'makerelease.py') # Trailing comma needed otherwise it's not a tuple

def excluded(name, exclusionlist):
for e in exclusionlist:
Expand Down

0 comments on commit fab84a3

Please sign in to comment.