Advertisement
Guest User

Untitled

a guest
May 30th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. ValueError Traceback (most recent call last)
  3. <ipython-input-14-5b0847471a51> in <module>()
  4. ----> 1 run(D0)
  5.  
  6. 3 frames
  7. <ipython-input-11-1b20cb4aa961> in runNVT_silent(D0)
  8. 31
  9. 32 def runNVT_silent(D0):
  10. ---> 33 return runNVT(D0,-1)
  11. 34
  12. 35 def runNVE(D0):
  13.  
  14. <ipython-input-11-1b20cb4aa961> in runNVT(D0, save_every)
  15. 7 init, apply = simulate.nvt_nose_hoover(energy_fn, shift, dt, kBT)
  16. 8 #apply = jit(apply)
  17. ----> 9 state = init(key, Rinit)
  18. 10
  19. 11 measure = []
  20.  
  21. /usr/local/lib/python3.6/dist-packages/jax_md/simulate.py in init_fun(key, R, mass, T_initial)
  22. 202
  23. 203 def init_fun(key, R, mass=f32(1.0), T_initial=f32(1.0)):
  24. --> 204 mass = quantity.canonicalize_mass(mass)
  25. 205 V = np.sqrt(T_initial / mass) * random.normal(key, R.shape, dtype=R.dtype)
  26. 206 V = V - np.mean(V, axis=0, keepdims=True)
  27.  
  28. /usr/local/lib/python3.6/dist-packages/jax_md/quantity.py in canonicalize_mass(mass)
  29. 81 'ndarray. Found {}.'.format(mass)
  30. 82 )
  31. ---> 83 raise ValueError(msg)
  32.  
  33. 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