A trajectory file is only half the story: choosing formats for molecular motion

A molecular trajectory can look like the right file and still be the wrong piece of the puzzle. One file may contain moving coordinates; another may describe the molecular structure those coordinates belong to. And formats that open successfully may not all be available for export. Sorting out these details before you start can save time when bringing simulation results into a molecular modeling workflow.

SAMSON supports a range of molecular trajectory formats, but the practical first question is simple: what do you need to do with the file? If you only need to inspect a trajectory, read support may be enough. If you need to save the data back out in another format, check write support too.

Start with the direction of travel

The documentation lists these trajectory formats and their read/write support:

  • Read and write: DCD, NC, PDB, TRR, and XTC.
  • Read only: ARC, LAMMPSTRJ, TNG, TRJ, and XYZ.

This distinction matters when planning a workflow. For example, SAMSON can read an XTC trajectory and write XTC, while the listed support for TNG is for reading only. If your next step requires exporting a trajectory, choose a format with write support rather than assuming every readable format can also be written.

Know what the extension means

Some file extensions point to different kinds of molecular data, so the context matters. PDB appears in the documentation both as a molecular-structure format and as a trajectory format. Its presence in the trajectory list means it can be used for molecular motion as well as for a standard structure file.

Other extensions are more closely associated with particular simulation ecosystems. DCD is described as a binary trajectory used by CHARMM, NAMD, or LAMMPS. LAMMPSTRJ is an ASCII trajectory written by LAMMPS’s dump command. TRR, XTC, TNG, and TRJ are identified as GROMACS trajectory formats, with XTC described as compressed. NC is the AMBER NetCDF format, also known for the read aliases NCDF and NCTRAJ.

For AMBER NetCDF, check the topology too

One useful detail sits outside the trajectory table: the molecular-structure section lists PARM7 and PRMTOP as AMBER topology files, used when loading AMBER NetCDF trajectories. In other words, when working with an AMBER NetCDF trajectory, keep the topology file in mind as part of the data you need—not just the NC file itself. The documentation identifies the relationship, but does not suggest that every trajectory can be loaded without its associated structural information.

A quick pre-flight check

  1. Identify the file’s format and what produced it.
  2. Check whether you need to read the file, write it, or both.
  3. For AMBER NetCDF, locate the corresponding PARM7 or PRMTOP topology file.
  4. Keep the original files together until you have confirmed that the data you need is available in your modeling workflow.

SAMSON uses the chemfiles library to read and write some trajectory formats. The documentation does not specify that every listed format uses this library, so treat it as a useful implementation detail rather than a guarantee about a particular file.

The key takeaway: check both the format and the operation you need. A short compatibility check can prevent a common handoff problem—discovering only after importing your data that the format you chose cannot be exported, or that a trajectory needs its topology alongside it.

For the full format reference, see the SAMSON supported formats documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.