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
PDB .pdb Yes Yes Yes
SDF .sdf Yes Yes Yes
Amber NetCDF .nc No Yes Yes
TNG .tng Yes Yes No
LAMMPS Data   Yes Yes Yes
Tinker .arc Yes Yes Yes
LAMMPS .lammpstrj No 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
MOL2 .mol2 Yes Yes No
Molden .molen Yes Atom names Yes No
MMTF .mmtf Yes Yes No

“LAMMPS” format correspond to trajectory files written by the LAMMPS dump command. “LAMMPS Data” correspond to LAMMPS data files, as read by the LAMMPS read_data command.

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++. See the src/formats/XYZ.cpp file for example. The list of planned formats can be found here. If you can not find your favorite format in this list, you can open an issue with a description of the format, or even better a link to the format specification. 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. Please open an issue on and provide a file example to test the plugin against it.