No variable transfer

This commit is contained in:
Ben Nebgen
2023-10-17 23:41:52 -06:00
parent 0fe621886e
commit 87fdff5874
5 changed files with 26 additions and 9 deletions

View File

@ -18,6 +18,7 @@ cdef extern from "mliap_data.h" namespace "LAMMPS_NS":
cdef cppclass MLIAPData:
# Array shapes
int nlistatoms
int nlocalunified
int ndescriptors
# Input data
@ -103,7 +104,8 @@ cdef public void MLIAPPY_compute_gradients(MLIAPModelPython * c_model, MLIAPData
model = retrieve(c_model)
n_d = data.ndescriptors
n_a = data.nlistatoms
#n_a = data.nlistatoms
n_a = data.nlocalunified
# Make numpy arrays from pointers
beta_np = np.asarray(<double[:n_a,:n_d] > &data.betas[0][0])