Skip to content

Commit fab84a3

Browse files
author
Stefan Doerr
committed
merged
2 parents 933f4f5 + 501d8ce commit fab84a3

File tree

9 files changed

+74
-25
lines changed

9 files changed

+74
-25
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ matrix:
2727
- brew install gcc
2828

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

4746
- conda config --add channels acellera
48-
- conda install -c acellera toolz=0.8.0 -y -q
47+
- conda install -c acellera toolz=0.8.0 -y -q
4948
- conda update --all -y -q
50-
- conda install anaconda requests conda-build -y -q
49+
- conda install anaconda anaconda-client requests conda-build -y -q
5150

5251

5352
- if [ "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then export BUILD_VERSION=$TRAVIS_TAG; else export BUILD_VERSION=0.0.0; fi

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
recursive-include htmd/data *
2+
recursive-include htmd/lib *
3+
include HTMD_LICENSE.txt

README.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
HTMD
2+
See https://www.htmd.org
3+
Installation through PyPI is experimental -- please report bugs via
4+
https://github.org/acellera/htmd/issues

htmd/adaptive/adaptive.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ def run(self):
7878
except ProjectNotExistError:
7979
logger.info('Retrieve found no previous simulations for this adaptive. Assuming this is a new adaptive run')
8080

81-
if epoch >= self.nepochs:
82-
logger.info('Reached maximum number of epochs ' + str(self.nepochs))
83-
self._unsetLock()
84-
return
85-
8681
# Checking how many simulations are in progress (queued/running) on the queue
8782
try:
8883
self._running = self.app.inprogress()
@@ -95,8 +90,13 @@ def run(self):
9590

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

93+
if epoch >= self.nepochs and self._running == 0:
94+
logger.info('Reached maximum number of epochs ' + str(self.nepochs))
95+
self._unsetLock()
96+
return
97+
9898
# If currently running simulations are lower than nmin start new ones to reach nmax number of sims
99-
if self._running <= self.nmin:
99+
if self._running <= self.nmin and epoch < self.nepochs:
100100
flag = self._algorithm()
101101
if flag is False:
102102
self._unsetLock()

htmd/apps/acemd.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class Acemd(ProtocolInterface):
1616
'coordinates': 'structure.pdb', 'velocities': 'velocity.pdb', 'consref': 'structure.pdb',
1717
'parmfile': 'structure.prmtop'}
1818

19-
def __init__(self):
19+
def __init__(self, version=2):
2020
super().__init__()
21-
21+
self._version=version
2222
self._files = {}
2323

2424
# Options
@@ -43,21 +43,26 @@ def __init__(self):
4343
self._cmdString('pmegridspacing', 'str', '', None)
4444
self._cmdString('fullelectfrequency', 'str', '', None)
4545
self._cmdString('energyfreq', 'str', '', None)
46-
self._cmdString('constraints', 'str', '', None)
47-
self._cmdString('consref', 'str', '', None)
48-
self._cmdString('constraintscaling', 'str', '', None)
46+
if self._version == 2:
47+
self._cmdString('constraints', 'str', '', None)
48+
self._cmdString('consref', 'str', '', None)
49+
self._cmdString('constraintscaling', 'str', '', None)
50+
if self._version == 3:
51+
self._cmdString('atomrestraint', 'str', '', None)
52+
self._cmdString('grouprestraint', 'str', '', None)
4953
self._cmdString('berendsenpressure', 'str', '', None)
5054
self._cmdString('berendsenpressuretarget', 'str', '', None)
5155
self._cmdString('berendsenpressurerelaxationtime', 'str', '', None)
5256
self._cmdString('tclforces', 'str', '', None)
5357
self._cmdString('minimize', 'str', '', None)
5458
self._cmdString('run', 'str', '', None)
55-
self._cmdString('TCL', 'str', '', None)
5659
self._cmdString('celldimension', 'str', '', None)
5760
self._cmdString('useconstantratio', 'str', '', None)
5861
self._cmdString('amber', 'str', '', None)
5962
self._cmdString('dielectric', 'str', '', None)
6063
self._cmdString('pairlistdist', 'str', '', None)
64+
if self._version == 2:
65+
self._cmdString('TCL', 'str', '', None)
6166

6267
# Files
6368
self._cmdString('bincoordinates', 'str', '', None)
@@ -68,7 +73,6 @@ def __init__(self):
6873
self._cmdString('extendedsystem', 'str', '', None)
6974
self._cmdString('coordinates', 'str', '', None)
7075
self._cmdString('velocities', 'str', '', None)
71-
self._cmdString('consref', 'str', '', None)
7276
self._cmdString('parmfile', 'str', '', None)
7377

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

176180
def _writeBashRun(self, fname):
177181
with open(fname, 'w') as f:
178-
f.write('#!/bin/bash\nacemd >log.txt 2>&1')
182+
if self._version==3:
183+
f.write('#!/bin/bash\nacemd3 >log.txt 2>&1')
184+
else:
185+
f.write('#!/bin/bash\nacemd >log.txt 2>&1')
179186
os.chmod(fname, 0o700)
180187

181188
def __repr__(self):

htmd/builder/amber.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
from __future__ import print_function
77

8+
89
from htmd.home import home
910
import numpy as np
1011
import os

setup.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from setuptools import setup
2+
import subprocess
3+
4+
version=subprocess.Popen(["git", "describe", "--tags"], stdout=subprocess.PIPE ).stdout.read().decode("utf8")
5+
version=version.split("-")
6+
version=version[0]
7+
8+
f=open( "package/htmd-deps/DEPENDENCIES", "r" )
9+
deps=[ 'pyEMMA<2.3' ]
10+
#for a in f.readlines():
11+
# deps.append(a.strip().split("=")[0]) #.decode("utf8"))
12+
13+
print("Version [%s]" % (version) )
14+
print("Dependencies:" )
15+
print(deps)
16+
17+
setup(name='htmd',
18+
version='0.15.11',
19+
description='HTMD',
20+
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' ],
21+
install_requires=deps,
22+
zip_safe=False,
23+
url="https://www.htmd.org",
24+
maintainer="Acellera Ltd",
25+
maintainer_email="[email protected]",
26+
entry_points = {
27+
"console_scripts": [
28+
'htmdnb = htmdx.cli:main_htmd_notebook',
29+
'htmd = htmdx.cli:main_htmd',
30+
'htmd_register = htmdx.cli:main_do_nothing',
31+
'parameterize = htmd.parameterization.cli:main_parameterize',
32+
'activate_license = htmdx.cli:main_activate'
33+
]
34+
},
35+
include_package_data=True
36+
)
37+

sync_conda_with_omnia.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555

5656
acellera = {"latest_version": "0" }
5757

58-
if omnia["latest_version"] != acellera["latest_version"]:
59-
print("Syncing %s/%s version %s.." %(pp[0], p, omnia["latest_version"]) )
58+
if omnia["latest_version"] > acellera["latest_version"]:
59+
print("Syncing %s/%s version %s (acellera version %s).." %(pp[0], p, omnia["latest_version"], acellera["latest_version"]) )
6060
for f in omnia["files"]:
6161
if f["version"] == omnia["latest_version"]:
6262
url = "https:" + f["download_url"]
@@ -69,11 +69,11 @@
6969
print("Uploading.." )
7070
try:
7171
os.getenv("ANACONDA_TOKEN_BASIC")
72-
call([ "anaconda", "upload", "-t", os.getenv("ANACONDA_TOKEN_BASIC"),"-u", "acellera", f["basename"] ])
72+
call([ "anaconda", "upload", "--force", "-t", os.getenv("ANACONDA_TOKEN_BASIC"),"-u", "acellera", f["basename"] ])
7373
except:
7474
try:
75-
call([ "anaconda", "upload", "-u", "acellera", f["basename"] ])
75+
call([ "anaconda", "upload", "--force", "-u", "acellera", f["basename"] ])
7676
except:
7777
print("Failed to sync")
7878
else:
79-
print("Package %s up to date at version %s" % ( p, omnia["latest_version"] ) )
79+
print("Package %s up to date at version %s/%s" % ( p, omnia["latest_version"], acellera["latest_version"] ) )

tests/run_inline_file_tests.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
from subprocess import call, check_output
99
import sys
1010

11-
excludedfolders = ('./tests', './doc', './htmdlib')
12-
excludedfiles = ('__init__.py', 'license_headers.py', 'sync_conda_with_omnia.py', 'makerelease.py') # Trailing comma needed otherwise it's not a tuple
13-
11+
excludedfiles = ('__init__.py', 'license_headers.py', 'setup.py', 'sync_conda_with_omnia.py', 'makerelease.py') # Trailing comma needed otherwise it's not a tuple
1412

1513
def excluded(name, exclusionlist):
1614
for e in exclusionlist:

0 commit comments

Comments
 (0)