Include Gromacs internal function for making Frames Whole
This commit is contained in:
@ -146,3 +146,11 @@ cdef extern from "gromacs/topology/topology.h":
|
|||||||
# cdef extern from "gromacs/topology/topology.h":
|
# cdef extern from "gromacs/topology/topology.h":
|
||||||
# generate a t_atoms struct for the system from gmx_mtop_t
|
# generate a t_atoms struct for the system from gmx_mtop_t
|
||||||
# t_atoms* mtop2atoms(gmx_mtop_t *mtop)
|
# t_atoms* mtop2atoms(gmx_mtop_t *mtop)
|
||||||
|
cdef extern from "gromacs/topology/mtop_util.h":
|
||||||
|
t_atoms gmx_mtop_global_atoms(const gmx_mtop_t *mtop)
|
||||||
|
|
||||||
|
cdef extern from "gromacs/pbcutil/rmpbc.h":
|
||||||
|
void rm_gropbc(const t_atoms *atoms, rvec x[], const matrix box);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -251,3 +251,12 @@ cdef class TPXReader:
|
|||||||
&self.topology
|
&self.topology
|
||||||
)
|
)
|
||||||
self.topology_name = self.topology.name[0]
|
self.topology_name = self.topology.name[0]
|
||||||
|
|
||||||
|
|
||||||
|
@cython.binding(True)
|
||||||
|
def make_xtcframe_whole(coords, box, <TPXReader>reader):
|
||||||
|
cdef t_atoms = gmx_mtop_global_atoms(reader.topology)
|
||||||
|
cdef np.ndarray[real, ndim=2] b = np.asarray(box, dtype=np.float32)
|
||||||
|
cdef np.ndarray[real, ndim=2] x = np.asarray(coords, dtype=np.float32)
|
||||||
|
rm_gropbc(const t_atoms *atoms, <rvec *>x.data, <matrix> b)
|
||||||
|
return x
|
Reference in New Issue
Block a user