Supported formats

List of supported formats

This page list the supported formats in chemfiles, with a link to the format specification. For eavch format, it is also indicated wether they have some information to create a Topology, and if you can read them, write them or both using chemfiles.

The Extension column gives the extension used when trying to detect the format. If your file does not have this extension, you can also use the string in the Format column as a parameter to the Trajectory constructor to manually specify which format to use.

Format Extension Topology ? Read ? Write ?
XYZ .xyz Yes Atom names Yes Yes
Amber NetCDF .nc No Yes Yes
PDB .pdb Yes Yes No
GRO .gro Yes Atom names Yes No
XTC .xtc No Yes No
TRJ .trj No Yes No
TRR .trr No Yes No
DCD .dcd No Yes No

Asking for a new format

If you want to use chemfiles with a format which is not yet implemented, you may easily add it by yourself if you know some C++. Just see the src/formats/XYZ.cpp file for example.

The list of planned formats can be found here. If and only if you can not find your format in this list, you can also add another format request at Github. In that case, please use the following header at the top of your message, and complete everything between square braces.

File Type                  | [text / binary]
---------------------------|---------------
Topological information    | [Yes / No]
Positions                  | [Yes / No]
Velocities                 | [Yes / No]

Format specification: [link to the specification]
File example: [link to a file example]

If your format is in the list of formats supported by VMD, then you are lucky ! It will be easy to add support for this format. Just provide a file example to test the plugin against it.