Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- ValueError Traceback (most recent call last)
- <ipython-input-14-5b0847471a51> in <module>()
- ----> 1 run(D0)
- 3 frames
- <ipython-input-11-1b20cb4aa961> in runNVT_silent(D0)
- 31
- 32 def runNVT_silent(D0):
- ---> 33 return runNVT(D0,-1)
- 34
- 35 def runNVE(D0):
- <ipython-input-11-1b20cb4aa961> in runNVT(D0, save_every)
- 7 init, apply = simulate.nvt_nose_hoover(energy_fn, shift, dt, kBT)
- 8 #apply = jit(apply)
- ----> 9 state = init(key, Rinit)
- 10
- 11 measure = []
- /usr/local/lib/python3.6/dist-packages/jax_md/simulate.py in init_fun(key, R, mass, T_initial)
- 202
- 203 def init_fun(key, R, mass=f32(1.0), T_initial=f32(1.0)):
- --> 204 mass = quantity.canonicalize_mass(mass)
- 205 V = np.sqrt(T_initial / mass) * random.normal(key, R.shape, dtype=R.dtype)
- 206 V = V - np.mean(V, axis=0, keepdims=True)
- /usr/local/lib/python3.6/dist-packages/jax_md/quantity.py in canonicalize_mass(mass)
- 81 'ndarray. Found {}.'.format(mass)
- 82 )
- ---> 83 raise ValueError(msg)
- ValueError: Expected mass to be either a floating point number or a one-dimensionalndarray. Found 1.0.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement