You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a model that has knot resolution 0 for an interaction, using UFCalculator results in an error message:
Traceback (most recent call last):
File "/home/***/***/***/.conda/envs/uf3_env/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/scratch/slurm_tmpdir/job_21050829/ipykernel_1790295/233011300.py", line 22, in eval
p_f = np.append(p_f, geom.get_forces())
File "/home/***/***/***/.conda/envs/uf3_env/lib/python3.8/site-packages/ase/atoms.py", line 788, in get_forces
forces = self._calc.get_forces(self)
File "/pfs/data5/home/***/***/***/ba/uf3/uf3/forcefield/calculator.py", line 215, in get_forces
f_3b = self.forces_3b(atoms, supercell)
File "/pfs/data5/home/***/***/***/ba/uf3/uf3/forcefield/calculator.py", line 288, in forces_3b
val_l = spline(triangles, nus=np.array([1, 0, 0]))
File "/home/***/***/***/.conda/envs/uf3_env/lib/python3.8/site-packages/ndsplines/ndsplines.py", line 220, in __call__
self.compute_basis_coefficient_selector(x, nus)
File "/home/***/***/***/.conda/envs/uf3_env/lib/python3.8/site-packages/ndsplines/ndsplines.py", line 172, in compute_basis_coefficient_selector
impl.evaluate_spline(t, k, x[:,i], nu, extrapolate_flag, self.interval_workspace[i], self.basis_workspace[i],)
File "ndsplines/_bspl.pyx", line 96, in ndsplines._bspl.evaluate_spline
ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'
Solution
The issue arises due to the JSON parsing used when loading models. Since the seven knot positions are all 0, they are loaded as integers. However, the ndspline package requires double. Therefore, the issue can be avoided when converting integer knot positions to doubles.
The text was updated successfully, but these errors were encountered:
Problem description
When loading a model that has knot resolution 0 for an interaction, using UFCalculator results in an error message:
Solution
The issue arises due to the JSON parsing used when loading models. Since the seven knot positions are all
0
, they are loaded as integers. However, the ndspline package requires double. Therefore, the issue can be avoided when converting integer knot positions to doubles.The text was updated successfully, but these errors were encountered: