Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @numba.njit
- def calcula_potencial(r):
- sr6 = (1./r)**6
- pot = 4.*(sr6*sr6 - sr6)
- return pot
- @numba.njit
- def distancia(atomo1, atomo2):
- dx = atomo2[0] - atomo1[0]
- dy = atomo2[1] - atomo1[1]
- dz = atomo2[2] - atomo1[2]
- r = (dx * dx + dy * dy + dz * dz) ** 0.5
- return r
Advertisement
Add Comment
Please, Sign In to add comment