It can be done either way. Whether to do it is up to you. The compiler
is obviously reporting that your attempt to duplicate the code wasn't
far-reaching enough. I suggest that extending the interface in the
header file to return the position, and also to seek to a given
position is a much better a
If the xdrfile library can't do what I want, writing out
the frames is an alternative. I know that the MDAnalysis
has modified the xdrfile library to do seeking xtc file.
But it seems that they do a python wrapper.
Thanks,
YC
On Aug 16, 2013, at 12:35 PM, Mark Abraham wrote:
> That's only worth
That's only worth bothering with if you'll do that re-read several
times. Is writing out the frame(s) of interest a better solution?
Mark
On Fri, Aug 16, 2013 at 6:25 PM, Xu, Yechuan wrote:
> Yes, I realized that it is a opaque structure.
> I just want to read a certain frame from the
> xtc file
Yes, I realized that it is a opaque structure.
I just want to read a certain frame from the
xtc file. For example, last time I read the xtc
file to a certain frame, I want to recorde the
position and next time I can read the xtc file
from there, not from beginning.
Did anybody do that?
Thanks,
YC
On Thu, Aug 15, 2013 at 11:33 PM, Xu, Yechuan wrote:
> Thank you for your reply. after I read the xdrfile.c,
>
> I changed the sentence as
> pos=xdr_getpos((XDR*) (xtc->xdr));
>
> like that in the file of xdrfile.c. I also copy the definition
> for XDR and xdr_op to my own code.
You can see those
Thank you for your reply. after I read the xdrfile.c,
I changed the sentence as
pos=xdr_getpos((XDR*) (xtc->xdr));
like that in the file of xdrfile.c. I also copy the definition
for XDR and xdr_op to my own code.
But I still got the errors:
seekxtc.c:61:33: error: dereferencing pointer to inco
Right, because a pointer to an XDRFILE is neither a struct nor a union
:-) Look at how these routines are used, and consult the header files
for the right types to give them.
Mark
On Thu, Aug 15, 2013 at 7:29 PM, Xu, Yechuan wrote:
> Hi Everyone,
>
> I want to read a certain frame in a xtc file.
Hi Everyone,
I want to read a certain frame in a xtc file. How can I do that?
I see there are xdr_getpos() and xdr_setpos(). How should I use
these functions?
I tried:
XDRFILE *xtc;
unsigned int pos;
pos=xdr_getpos(xtc.xdr);
but I got:
error: request for member ‘xdr’ in something not a structu
8 matches
Mail list logo