markovmodel / thermotools

Winter is coming...
spdy://probably.not.this.year
GNU Lesser General Public License v3.0
12 stars 4 forks source link

python 3.5.1: utils does not recognize type "long" #32

Closed gph82 closed 8 years ago

gph82 commented 8 years ago
adw_us_wham = pyemma.thermo.estimate_umbrella_sampling(
    adw_us_trajs, adw_us_cluster.dtrajs, adw_us_umbrella_centers, adw_us_force_constants,
    maxiter=10000, maxerr=1.0E-15, save_convergence_info=50, estimator='wham')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-34-c27f7d23a6b6> in <module>()
      1 adw_us_wham = pyemma.thermo.estimate_umbrella_sampling(
      2     adw_us_trajs, adw_us_cluster.dtrajs, adw_us_umbrella_centers, adw_us_force_constants,
----> 3     maxiter=10000, maxerr=1.0E-15, save_convergence_info=50, estimator='wham')
      4 adw_us_dtram = pyemma.thermo.estimate_umbrella_sampling(
      5     adw_us_trajs, adw_us_cluster.dtrajs, adw_us_umbrella_centers, adw_us_force_constants,

/home/guille/anaconda/lib/python3.5/site-packages/pyEMMA-2.1rc2-py3.5-linux-x86_64.egg/pyemma/thermo/api.py in estimate_umbrella_sampling(us_trajs, us_dtrajs, us_centers, us_force_constants, md_trajs, md_dtrajs, kT, maxiter, maxerr, save_convergence_info, estimator, lag, dt_traj, init)
    108     from .util import get_umbrella_sampling_data as _get_umbrella_sampling_data
    109     ttrajs, btrajs, umbrella_centers, force_constants = _get_umbrella_sampling_data(
--> 110         us_trajs, us_centers, us_force_constants, md_trajs=md_trajs, kT=kT)
    111     if md_dtrajs is None:
    112         md_dtrajs = []

/home/guille/anaconda/lib/python3.5/site-packages/pyEMMA-2.1rc2-py3.5-linux-x86_64.egg/pyemma/thermo/util/util.py in get_umbrella_sampling_data(us_trajs, us_centers, us_force_constants, md_trajs, kT)
    167     """
    168     ttrajs, umbrella_centers, force_constants = _get_umbrella_sampling_parameters(
--> 169         us_trajs, us_centers, us_force_constants, md_trajs=md_trajs, kT=kT)
    170     if md_trajs is None:
    171         md_trajs = []

/home/guille/anaconda/lib/python3.5/site-packages/pyEMMA-2.1rc2-py3.5-linux-x86_64.egg/pyemma/thermo/util/util.py in _get_umbrella_sampling_parameters(us_trajs, us_centers, us_force_constants, md_trajs, kT)
     93         state = None
     94         this_center = _ensure_umbrella_center(
---> 95             us_centers[i], us_trajs[i].shape[1])
     96         this_force_constant = _ensure_force_constant(
     97             us_force_constants[i], us_trajs[i].shape[1])

/home/guille/anaconda/lib/python3.5/site-packages/pyEMMA-2.1rc2-py3.5-linux-x86_64.egg/pyemma/thermo/util/util.py in _ensure_umbrella_center(candidate, dimension)
     64         assert candidate.shape[0] == dimension
     65         return candidate.astype(_np.float64)
---> 66     elif isinstance(candidate, (int, long, float)):
     67         return candidate * _np.ones(shape=(dimension,), dtype=_np.float64)
     68     else:

NameError: name 'long' is not defined
marscher commented 8 years ago

The input you used should be a test case, since this has not been catched by Travis.

gph82 commented 8 years ago

It's on the notebooks, Chris told me to post an issue

On 02/24/2016 12:21 PM, Martin K. Scherer wrote:

The input you used should be a test case, since this has not been catched by Travis.

— Reply to this email directly or view it on GitHub https://github.com/markovmodel/thermotools/issues/32#issuecomment-188204436.

Dr. Guillermo Pérez-Hernández Freie Universität Berlin Institute for Mathematics Arnimallee 6 D-14195 Berlin tel 0049 30 838 75776

marscher commented 8 years ago

actually this is a bug in PyEMMA (look at the paths)

marscher commented 8 years ago

fixed in pyemma