Skip to content

Commit

Permalink
Merge branch 'v2.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed Mar 13, 2023
2 parents aac0faf + 18d5480 commit 4f91d4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plumed.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ cdef class Plumed:
for i in range(len(shape)):
ashape[i]=shape[i]
ashape[len(shape)]=0
self.cmd_low_level(ckey,&abuffer[0], 0, & ashape[0], sizeof(ashape[0]) + type_real + type_pointer)
self.cmd_low_level(ckey,&abuffer[0], 0, & ashape[0], sizeof(abuffer[0]) + type_real + type_pointer)
cdef cmd_ndarray_int(self, ckey, val):
cdef int [:] abuffer = val.ravel()
cdef size_t ashape[5]
Expand All @@ -195,7 +195,7 @@ cdef class Plumed:
for i in range(len(shape)):
ashape[i]=shape[i]
ashape[len(shape)]=0
self.cmd_low_level(ckey,&abuffer[0], 0, & ashape[0], sizeof(ashape[0]) + type_integral + type_pointer)
self.cmd_low_level(ckey,&abuffer[0], 0, & ashape[0], sizeof(abuffer[0]) + type_integral + type_pointer)
cdef cmd_ndarray_long(self, ckey, val):
cdef long [:] abuffer = val.ravel()
cdef size_t ashape[5]
Expand All @@ -204,7 +204,7 @@ cdef class Plumed:
for i in range(len(shape)):
ashape[i]=shape[i]
ashape[len(shape)]=0
self.cmd_low_level(ckey,&abuffer[0], 0, & ashape[0], sizeof(ashape[0]) + type_integral + type_pointer)
self.cmd_low_level(ckey,&abuffer[0], 0, & ashape[0], sizeof(abuffer[0]) + type_integral + type_pointer)
cdef cmd_array_double(self, ckey, val):
cdef double [:] abuffer = val
self.cmd_low_level(ckey,&abuffer[0], len(abuffer), NULL, sizeof(abuffer[0]) + type_real + type_pointer)
Expand Down
5 changes: 5 additions & 0 deletions python/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def runtest(self):

# Create PLUMED object and read input
p = plumed.Plumed()

# not really needed, used to check https://github.com/plumed/plumed2/issues/916
plumed_version = np.zeros(1, dtype=np.intc)
p.cmd( "getApiVersion", plumed_version)

p.cmd("setMDEngine","python")
p.cmd("setTimestep", 1.)
p.cmd("setKbT", 1.)
Expand Down

0 comments on commit 4f91d4c

Please sign in to comment.