Trajectory Submodule
Experimental trajectory submodule adds support for trajectory structures that are subtypes of AbstractVector{AbstractSystem}
. These are more optimized than simply storing systems in a vector.
The optimizations come from the fact that data structures are only allocated once for the trajectory not for each frame.
Trajectory types
The basic principle is same as with systems. The structures are layered with additional properties.
SimpleTrajectory
- species and position onlySimpleVelocityTrajectory
- species, position and velocityConstantVolumeTrajectory
- constant cell trajectoryVariableVolumeTrajectory
- cell can change for each frame
All trajectory types expect that number of atoms and species are constants.
Examples
You can create trajectories by giving vector of systems as and input
using AtomsBase
using AtomsSystems
using AtomsSystems.AtomsTrajectories
first_frame = generic_system"""
H 0 0 0
O 1 0 0
"""
second_frame = generic_system"""
H 0 0 0
O 1.1 0 0
"""
traj = VariableVolumeTrajectory([first_frame, second_frame])
SimpleTrajectory with 2 frames, each with 2 atoms
or by creating trajectory by giving first frame and then pushing to the system
traj = VariableVolumeTrajectory(first_frame)
push!(traj, second_frame)
SimpleTrajectory with 2 frames, each with 2 atoms
To use you can just index it
traj[2]