[gmx-developers] Hi and Gmx library development
David van der Spoel
spoel at xray.bmc.uu.se
Mon Jul 23 08:45:37 CEST 2007
Daniel Gutson wrote:
> Hi again David,
> sorry that I´m making a so basic question, but, please I beg you to
> correct if I´m wrong. There is no random access to XTC files, right?
yes and no, there is a binary search algorithm that finds the frame
quite fast, it does have to access the disk though which makes it slower
than true random access.
> In other words, there are no indexes, as I saw so far.
> And, I understand from your email that you refer to atom-level indexes,
> right?
yes.
> Would adding per-xtc indexes be desirable? For example, given the
> step, get the xtc, something like
>
> extern int read_random_xtc(int fp, int ip, int step,
> int *natoms,real *time,
> matrix box,rvec **x,real *prec,bool *bOK);
>
> (or maybe ´read_xtc_by_step´)
>
> where ´step´ is provided, and ´ip´ would be a handler to an index
> files, where the ´seek´ position is retrieved. This would require yet
> 2 other functions to generate and read indexes:
>
> extern int index_xtc(const char *filename, const char* indexfile);
> extern int open_indexes(char *filename,char *mode);
> extern int close_indexes(int ip);
>
> what do you think?
> Would this be useful?
As I said, the functionality is already there (using the time flags, -b,
-e). It cannot be made better than it is because the frames are not the
same size.
>
> Sorry if I´m asking too basic questions, and thanks for the understanding.
>
> Daniel.
>
> On 7/14/07, David van der Spoel <spoel at xray.bmc.uu.se> wrote:
>> Daniel Gutson wrote:
>> > Hi Gmx developers,
>> > we'd need to use some Gmx functionality (such as rmsd) from our
>> programs.
>> > It would be very nice to get such functionality as a library, and I
>> > saw in the wiki that there are 2 related projects:
>> > * Analysis-Library
>> > * Analysis-Related
>> >
>> > Are these projects intended for encapsulating the functionality as we
>> > need it?
>> > If so, what's the status of the projects? We could contribute to that,
>> > if it provides any help.
>> > Additionally, our programs are written in C++, so if a library is to
>> > be done, we could provide a thin (mostly inlined) C++ wrapping library
>> > as well.
>> >
>> Hi,
>>
>> all the analysis programs are already compiled into one library, so you
>> can for instance call a function gmx_rmsd(int argc,char *argv[]);
>> Obviously that is almost the same as doing a system call.
>>
>> What I would like to have is distinction between the low level and the
>> high level. such that you can call e.g. the rdf function for a single
>> coordinate set and then get the results back. It would also be great if
>> there could be online visualization but that is not crucial for a start.
>>
>> I'm not sure how familiar you are with GROMACS, but for most analyses we
>> use index files containing atom numbers, e.g. the atoms used for the RDF
>> calculation. Since we want to bring this to a new level of abstraction
>> we'd also need something like "dynamic indices", such that one at each
>> step determines, e.g. which are the oxygen atoms in a protein. This is
>> necessary when the number of atoms is dynamic as well.
>>
>> Calling C-funtions from C++ is trivial as you are aware.
>>
>> Please give us some more details on what you could contribute with and
>> what the aim of your project is.
>> > Thanks!
>> >
>> > Daniel.
>> > _______________________________________________
>> > gmx-developers mailing list
>> > gmx-developers at gromacs.org
>> > http://www.gromacs.org/mailman/listinfo/gmx-developers
>> > Please don't post (un)subscribe requests to the list. Use the www
>> > interface or send it to gmx-developers-request at gromacs.org.
>>
>>
>> --
>> David.
>> ________________________________________________________________________
>> David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
>> Dept. of Cell and Molecular Biology, Uppsala University.
>> Husargatan 3, Box 596, 75124 Uppsala, Sweden
>> phone: 46 18 471 4205 fax: 46 18 511 755
>> spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> _______________________________________________
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://www.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the
>> www interface or send it to gmx-developers-request at gromacs.org.
>>
>
>
--
David van der Spoel, Ph.D.
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
More information about the gromacs.org_gmx-developers
mailing list