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 Read Write Atomic names Bonds
Amber NetCDF .nc Yes Yes No No
CSSR .cssr Yes Yes Yes Yes
DCD .dcd Yes No No No
GRO .gro Yes Yes Yes No
LAMMPS Data   Yes Yes Yes Yes
LAMMPS .lammpstrj Yes No No No
mmCIF .mmcif Yes Yes Yes No
MMTF .mmtf Yes Yes Yes Yes
MOL2 .mol2 Yes Yes Yes Yes
Molden .molen Yes No Yes No
PDB .pdb Yes Yes Yes Yes
SDF .sdf Yes Yes Yes Yes
TNG .tng Yes No Yes Yes
TRJ .trj Yes No No No
TRR .trr Yes No No No
Tinker .arc Yes Yes Yes Yes
XTC .xtc Yes No No No
XYZ .xyz Yes 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.