Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gromacs's TNG format #865

Open
1 of 7 tasks
jbarnoud opened this issue May 31, 2016 · 10 comments
Open
1 of 7 tasks

Support for Gromacs's TNG format #865

jbarnoud opened this issue May 31, 2016 · 10 comments

Comments

@jbarnoud
Copy link
Contributor

jbarnoud commented May 31, 2016

Gromacs is slowly moving toward the new TNG trajectory format. The format got introduced in the late releases of the 4 serie, and should become the default format eventually.

TNG allows better compression that XTC, and have random frame access built in. It also allows to store arbitrary data along side the trajectory (which may require #785), and time-dependant topology (which would require #864).

A library is provided by the gromacs people: https://github.com/gromacs/gromacs/tree/master/src/external/tng_io

See the paper: http://onlinelibrary.wiley.com/doi/10.1002/jcc.23495/full

Full support for the TNG format can be implemented in parts:

  • read trajectory with constant topology
  • write trajectory with constant topology
  • read constant topology
  • read trajectory with time-dependant topology
  • write trajectory with time-dependant topology
  • read arbitrary data
  • write arbitrary data
@orbeckst
Copy link
Member

orbeckst commented Jun 2, 2016

And according to chatter on gmx-dev, it's being implemented in mdtraj.

@khuston
Copy link
Contributor

khuston commented Jun 22, 2016

I took a minimal crack at this with some cython that exposes the coordinates to python. (no actual MDAnalysis reader though):
https://gist.github.com/khuston/fde287d32f346a7c2dba7a6182518d46
I guess we'd include the tng_io library headers and source to be built when MDAnalysis is installed?

Looking at the MDTraj progress, it looks like their reader is nearly complete if not entirely complete.

@richardjgowers
Copy link
Member

@khuston that looks like a good start. You could keep the tng/Cython as a small interface like @kain88-de did here:

https://github.com/MDAnalysis/mdanalysis/blob/develop/package/MDAnalysis/lib/formats/libmdaxdr.pyx

Then write a Reader which uses this interface like here:

https://github.com/MDAnalysis/mdanalysis/blob/develop/package/MDAnalysis/coordinates/XTC.py

Don't worry about how to incorporate the Reader into MDA yet, that can wait until it's working nicely.

WRT tests, you should be able to convert the XTC file in the tests to a TNG and just steal borrow all the XTC tests

@orbeckst
Copy link
Member

Is it realistic to have basic TNG support (at least reading fixed number of atoms) in 0.17.0? It would certainly look very good on the feature list.

@hmacdope
Copy link
Member

hmacdope commented Sep 9, 2022

Can be closed with #3765

@orbeckst orbeckst linked a pull request Sep 9, 2022 that will close this issue
4 tasks
@jbarnoud
Copy link
Contributor Author

jbarnoud commented Sep 9, 2022

Can be closed with #3765

Not really. #3765 only ticks the first box from the todo list.

@hmacdope
Copy link
Member

hmacdope commented Sep 9, 2022

Fair point.

@hmacdope
Copy link
Member

hmacdope commented Sep 9, 2022

Of the remaining I would say the ordering in terms of priority would go

  • read topology
  • write trajectory
  • write topology
  • everything else

I don't think time dependent topology is something we can really handle either right? So I would push that down the list a bit.
Sound about right?

@jbarnoud
Copy link
Contributor Author

jbarnoud commented Sep 9, 2022

Time-dependent topologies will require a fairly major overhaul of the whole library. Let's not go there for now.

@orbeckst orbeckst removed a link to a pull request Sep 9, 2022
4 tasks
@orbeckst
Copy link
Member

orbeckst commented Sep 9, 2022

Fair enough, I unlinked this issue from PR #3765.

This issue will be an forever-open issue...

IAlibay added a commit that referenced this issue Dec 15, 2022
Fixes #3237 and partially addresses #865 (reading TNG)
* Add TNG reader

Co-authored-by: Oliver Beckstein <orbeckst@gmail.com>
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants