avoid ASE's attempt to get the stress tensor when writing trajectories in cases where the stress was not calculated.