A trajectory won’t load? Start with the structure it belongs to

A molecular trajectory can contain thousands of coordinate frames, yet still be difficult to use if it is separated from the structure or topology it belongs to. When an animation looks wrong, atoms seem mismatched, or a file simply will not load, the problem may not be the trajectory format alone: the accompanying files and their atom ordering matter too.

Here is a practical way to think through trajectory compatibility before you spend time troubleshooting.

First, identify what each file contains

A structure file describes a molecular arrangement; a trajectory stores coordinate frames that change over time. Some workflows also rely on a topology file to provide information about the system. These files are related, but they are not interchangeable. In particular, a trajectory should be interpreted with the structure or topology that corresponds to it. A mismatch in atom count or atom order can lead to confusing results, even when the file itself is readable.

SAMSON documents support for several molecular trajectory formats, including DCD, AMBER NetCDF (NC), GROMACS TNG, TRR, TRJ, and XTC, as well as ARC, LAMMPSTRJ, PDB, and XYZ. The documentation marks which formats can be read and which can also be written. For example, DCD, NC, TRR, and XTC are listed for both reading and writing, while TNG and LAMMPSTRJ are listed for reading.

Check the companion file before opening the trajectory

For AMBER NetCDF trajectories, the format reference specifically notes that a PARM7 or PRMTOP topology file is used when loading the trajectory. If you have an NC file, check whether the corresponding topology is available as well. This is a useful reminder to preserve a simulation’s associated files together rather than treating the trajectory as a self-contained molecular model.

For other formats, verify that you have the correct structure or topology from the same simulation or preparation step. If two files describe different atom selections, or list atoms in different orders, their coordinates may not correspond as expected. When possible, keep the original file names and directory structure, and make a note of which structure and trajectory were produced together.

A quick pre-load checklist

  • Identify the extension. Is the file a trajectory, a structure, or a topology?
  • Check read support. Confirm that the format is listed as readable in SAMSON’s reference.
  • Gather companion files. For AMBER NetCDF, include the relevant PARM7 or PRMTOP file.
  • Confirm correspondence. Use the structure or topology associated with that trajectory, not simply a similarly named file.
  • Keep a copy of the originals. This makes it easier to compare files and retrace the simulation’s inputs if the result is unexpected.

One detail that can prevent a false start: the documentation notes that SAMSON uses the chemfiles library to read and write some trajectory formats. The reference does not identify that library as the handler for every format, so check the format’s listed capabilities rather than assuming all formats behave identically.

When a trajectory does not behave as expected, approach it as a small compatibility check: identify the format, locate its companion structure or topology, and verify that the files belong together. For the complete format tables and notes, see the SAMSON supported formats reference.

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

Comments are closed.