From d564d427b1e4342b64b8804f222434aef0298f78 Mon Sep 17 00:00:00 2001 From: kyleabeauchamp Date: Tue, 13 Jan 2015 11:04:51 -0500 Subject: [PATCH 1/5] Fixes to init.py --- openmmtools/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openmmtools/__init__.py b/openmmtools/__init__.py index ef68f6235..2ed86278d 100644 --- a/openmmtools/__init__.py +++ b/openmmtools/__init__.py @@ -6,10 +6,8 @@ """ # Define global version. -import version +from openmmtools import version __version__ = version.version # Import modules. -import testsystems -import integrators - +from openmmtools import testsystems, integrators From bf8aa48cc81cdedea1e5cd7380b2d01d6286d155 Mon Sep 17 00:00:00 2001 From: kyleabeauchamp Date: Tue, 13 Jan 2015 11:14:55 -0500 Subject: [PATCH 2/5] Print fixes to sobol --- openmmtools/sobol.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openmmtools/sobol.py b/openmmtools/sobol.py index 5b49e64ad..48ffaba5b 100644 --- a/openmmtools/sobol.py +++ b/openmmtools/sobol.py @@ -330,10 +330,10 @@ def i4_sobol ( dim_num, seed ): # Check parameters. # if ( dim_num < 1 or dim_max < dim_num ): - print 'I4_SOBOL - Fatal error!' - print ' The spatial dimension DIM_NUM should satisfy:' - print ' 1 <= DIM_NUM <= %d'%dim_max - print ' But this input value is DIM_NUM = %d'%dim_num + print('I4_SOBOL - Fatal error!') + print(' The spatial dimension DIM_NUM should satisfy:') + print(' 1 <= DIM_NUM <= %d'%dim_max) + print(' But this input value is DIM_NUM = %d'%dim_num) return dim_num_save = dim_num @@ -427,10 +427,10 @@ def i4_sobol ( dim_num, seed ): # Check that the user is not calling too many times! # if ( maxcol < l ): - print 'I4_SOBOL - Fatal error!' - print ' Too many calls!' - print ' MAXCOL = %d\n'%maxcol - print ' L = %d\n'%l + print('I4_SOBOL - Fatal error!') + print(' Too many calls!') + print(' MAXCOL = %d\n'%maxcol) + print(' L = %d\n'%l) return # # Calculate the new components of QUASI. From c87dcaeefac95c029385f441ff4ad038c4d3b2fe Mon Sep 17 00:00:00 2001 From: kyleabeauchamp Date: Tue, 13 Jan 2015 11:16:24 -0500 Subject: [PATCH 3/5] Print fixes to sobol --- openmmtools/sobol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmmtools/sobol.py b/openmmtools/sobol.py index 48ffaba5b..fc5c1f2e6 100644 --- a/openmmtools/sobol.py +++ b/openmmtools/sobol.py @@ -504,8 +504,8 @@ def i4_uniform ( a, b, seed ): # Output, integer SEED, the updated seed. # if ( seed == 0 ): - print 'I4_UNIFORM - Fatal error!' - print ' Input SEED = 0!' + print('I4_UNIFORM - Fatal error!') + print(' Input SEED = 0!') seed = math.floor ( seed ) a = round ( a ) From 0515e5a01a9e0af6b425448fe62547d66912a954 Mon Sep 17 00:00:00 2001 From: kyleabeauchamp Date: Tue, 13 Jan 2015 11:25:27 -0500 Subject: [PATCH 4/5] py3 fixes --- devtools/conda-recipe/meta.yaml | 1 + openmmtools/sobol.py | 1 + 2 files changed, 2 insertions(+) diff --git a/devtools/conda-recipe/meta.yaml b/devtools/conda-recipe/meta.yaml index bf3df506b..67d51d79f 100644 --- a/devtools/conda-recipe/meta.yaml +++ b/devtools/conda-recipe/meta.yaml @@ -28,6 +28,7 @@ requirements: - nose - setuptools - jinja2 + - six test: diff --git a/openmmtools/sobol.py b/openmmtools/sobol.py index fc5c1f2e6..823583a97 100644 --- a/openmmtools/sobol.py +++ b/openmmtools/sobol.py @@ -7,6 +7,7 @@ """ import math +from six.moves import xrange from numpy import * def i4_bit_hi1 ( n ): From 03fc6c4c28bc2ff2a7bdc656a2a4ba42ed4a55d1 Mon Sep 17 00:00:00 2001 From: kyleabeauchamp Date: Tue, 13 Jan 2015 11:37:11 -0500 Subject: [PATCH 5/5] Fixed print keyword in testsystems --- openmmtools/testsystems.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmmtools/testsystems.py b/openmmtools/testsystems.py index 7b016bfde..b58ee6c41 100644 --- a/openmmtools/testsystems.py +++ b/openmmtools/testsystems.py @@ -458,7 +458,7 @@ class HarmonicOscillator(TestSystem): Get a list of the available analytically-computed properties. - >>> print ho.analytical_properties + >>> print(ho.analytical_properties) ['potential_expectation', 'potential_standard_deviation'] Compute the potential expectation and standard deviation