def read_next_xtc(handle, natoms, xpointer): step = c_int() time = c_real() prec = c_real() bOK = c_int() box = matrix() ret=libgmx.read_next_xtc(handle,natoms,byref(step),byref(time),box,xpointer,byref(prec),byref(bOK)) # if ret!=1: # raise GMXctypesError,"read_next_xtc did not return 1" return step.value,time.value,box,prec.value,bOK.value,ret
def read_next_xtc(handle, natoms, xpointer): step = c_int() time = c_real() prec = c_real() bOK = c_int() box = matrix() ret = libgmx.read_next_xtc(handle, natoms, byref(step), byref(time), box, xpointer, byref(prec), byref(bOK)) # if ret!=1: # raise GMXctypesError,"read_next_xtc did not return 1" return step.value, time.value, box, prec.value, bOK.value, ret
def read_first_xtc(handle): natoms = c_int() step = c_int() time = c_real() prec = c_real() bOK = c_int() box = matrix() xpointer = POINTER(rvec)() ret=libgmx.read_first_xtc(handle,byref(natoms),byref(step),byref(time),box,byref(xpointer),byref(prec),byref(bOK)) # if ret!=1: # raise GMXctypesError,"read_first_xtc did not return 1" return natoms.value,step.value,time.value,box,xpointer,prec.value,bOK.value,ret
def read_first_xtc(handle): natoms = c_int() step = c_int() time = c_real() prec = c_real() bOK = c_int() box = matrix() xpointer = POINTER(rvec)() ret = libgmx.read_first_xtc(handle, byref(natoms), byref(step), byref(time), box, byref(xpointer), byref(prec), byref(bOK)) # if ret!=1: # raise GMXctypesError,"read_first_xtc did not return 1" return natoms.value, step.value, time.value, box, xpointer, prec.value, bOK.value, ret
def write_xtc(handle, natoms, step, time, box, xpointer, prec): ret = libgmx.write_xtc(handle, natoms, step, c_real(time), box, xpointer, c_real(prec)) return ret