I have added two XYZ files in Ovito:
- File 1 contains 2 frames
- File 2 contains 1000 frames
I now want to show the complete trajectories of the atoms in File 2. If I first load File 1, and then File 2, the created trajectory only contains two points (or an error if I don't check that File 1 contains multiple frames). But if I first load File 2, and then File 1, I get the full trajectories of the atoms in File 2.
It seems this is due to the fact that Ovito takes the number of frames from the first loaded dataset, and not the dataset which actually contains the atoms for which the trajectories should be created (or the file I have chosen in the Object selector dropdown).
Let me start by explaining the current behavior:
The trajectory lines are always created over the length of the current animation interval, which is the one indicated by the timeline at the bottom of the main window. By default, the animation interval is automatically adjusted to the length of the first simulation sequence loaded. Any additional datasets imported later will not affect the length of the animation interval.
Which input dataset determines the length of the current animation interval is controlled by the "Adjust animation length to time series" option, which can be found in the settings panel of each imported data file (see 1st screenshot here). Ovito checks this option automatically only for the first imported simulation sequence.
You can manually uncheck this option for the first file and set it for the second file to adjust the animation interval to the second simulation sequence, which is longer. Note that you can also uncheck this option for all files and instead manually adjust the animation interval to any length you want using the animation settings dialog.
This being said, the questions is: Is the current behavior of the Create Trajectory Lines tool correct, which creates lines over the current animation interval (whatever its length is) and not the actual number of simulation frames of the selected dataset.
I tend to agree that the latter behavior makes more sense and would be the one expected by the user. So this needs to be changed.