radical-cybertools / radical.repex.at

This is the github location for RepEx developed by the RADICAL team in conjunction with the York Lab.
Other
4 stars 3 forks source link

after adding math exp check, the exchange index seems not running right #32

Open taisung opened 9 years ago

taisung commented 9 years ago

I added a check for overflow of exp() function in the file "RepEx/src/radical/repex/md_kernels/md_kernel_3d_tuu.py":

        if item > math.log(sys.float_info.max) : new_item=sys.float_info.max
        elif item < math.log(sys.float_info.min)  : new_item=0.0
        else :
           new_item = math.exp(item)

Now the exchange step gives me the following error:

Traceback (most recent call last): File "launch_simulation_pattern_b_3d_tuu.py", line 53, in pilot_kernel.run_simulation( replicas, pilot_object, session, md_kernel ) File "/usr/people/taisung/myenv/lib/python2.7/site-packages/pilot_kernels/pilot_kernel_pattern_b_multi_d.py", line 356, in run_simulation md_kernel.select_for_exchange(DIM, replicas, matrix_columns, current_cycle) File "/usr/people/taisung/myenv/lib/python2.7/site-packages/amber_kernels_3d_tuu/kernel_pattern_b_3d_tuu.py", line 634, in select_for_exchange self.do_exchange(dimension, current_group, swap_matrix) File "/usr/people/taisung/myenv/lib/python2.7/site-packages/amber_kernels_3d_tuu/kernel_pattern_b_3d_tuu.py", line 552, in do_exchange r_j = self.gibbs_exchange(r_i, replicas, swap_matrix) File "/usr/people/taisung/myenv/lib/python2.7/site-packages/md_kernels/md_kernel_3d_tuu.py", line 158, in gibbs_exchange r_j = replicas[j] TypeError: list indices must be integers, not NoneType

antonst commented 9 years ago

The problem is: self.weighted_choice_sub(ps) returns None

haoyuanchen commented 9 years ago

The problem is the new_item is not appended to the new_ps. I've fixed and commited that. Please check it out.

haoyuanchen commented 9 years ago

This used to be fixed once, but when I just tried to run ace_ala_nme example again and I got the same error again. Strangely, I'm not getting this error when running the phos_trans example.

antonst commented 9 years ago

Which branch we are talking about here?

haoyuanchen commented 9 years ago

2d-prof

ibethune commented 7 years ago

Not touched for 2 years -> backburner