Install pyjulip from https://github.com/casv2/pyjulip
This requires pyjulia to be set up properly first: https://github.com/JuliaPy/pyjulia
import pyjulip
from ase.build import bulk
import time
at = bulk("Al") * (2,2,2)
calc = pyjulip.ACE("./ACE_Al.json")
at.rattle(0.01)
at.set_calculator(calc)
at.get_forces()
array([[-0.00014092, -0.02436524, -0.04762882], [-0.042433 , 0.02391434, -0.02832742], [-0.01745242, -0.05401593, 0.02261669], [-0.00415915, 0.01636964, 0.05024348], [ 0.00684032, 0.07615094, 0.04716693], [-0.00229448, -0.02161298, -0.00072229], [ 0.03770642, 0.04145959, -0.06849356], [ 0.02193323, -0.05790036, 0.02514498]])
at.get_potential_energy()
-878.3044107083637
def get_forces(at):
at.rattle(0.01)
return at.get_forces()
N = 100
t1 = time.time()
for i in range(N):
get_forces(at)
t2 = time.time()
print("FORCE CALL/ATOM [ms]:", ((t2-t1)/N)/len(at) * 1E3)
FORCE CALL/ATOM [ms]: 1.214248538017273