rcsb / mmtf-cpp

The pure C++ implementation of the MMTF API, decoder and encoder.
MIT License
21 stars 24 forks source link

Trajectory file storage and transmission #42

Closed samarjeet closed 3 years ago

samarjeet commented 3 years ago

I am trying to write out MD trajectory in a format which will make it easy to visualize via nglviewer. Does mmtf-cpp write out trajectory data as well? If so, is there an example script showing the intended usage?

Thanks

gtauriello commented 3 years ago

There is nothing specifically for trajectories in the MMTF format and so it will very much depend on what NGL can accept to visualize trajectories. I could imagine that one can encode a trajectory as a sequence of models but how to do this exactly is beyond the scope of this repository since this here is only about how to read/write MMTF files and not how to format your custom data into MMTF.

I would suggest that you ask the question in the NGL repository or in the MMTF repository describing the file format since your inquiry seems more suited there. If it turns out that MMTF is a suitable format for it and C++ is your language of choice, then this library will be able to write the data but it will be up to you to process your trajectory data into the respective fields of the MMTF file format.