Skip to content

Commit

Permalink
Merge pull request #30 from kyleabeauchamp/py3
Browse files Browse the repository at this point in the history
Fixes to init.py
  • Loading branch information
kyleabeauchamp committed Jan 13, 2015
2 parents 55c090e + 03fc6c4 commit b906648
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions devtools/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ requirements:
- nose
- setuptools
- jinja2
- six


test:
Expand Down
6 changes: 2 additions & 4 deletions openmmtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 11 additions & 10 deletions openmmtools/sobol.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""

import math
from six.moves import xrange
from numpy import *

def i4_bit_hi1 ( n ):
Expand Down Expand Up @@ -330,10 +331,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
Expand Down Expand Up @@ -427,10 +428,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.
Expand Down Expand Up @@ -504,8 +505,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 )
Expand Down
2 changes: 1 addition & 1 deletion openmmtools/testsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b906648

Please sign in to comment.