Frame
type¶Frame
¶A Frame
holds data for one step of a simulation. As not all formats
provide all the types of information, some fields may be initialized to a
default value. A Frame
may contain the following data:
Topology
of the system;UnitCell
of the system.Frame
()¶Frame
.deepcopy
(frame::Frame)¶Frame
.size
(frame::Frame)¶frame
.resize!
(frame::Frame, natoms::Integer)¶frame
, to make space for
natoms
atoms. This function may invalidate any pointer to the positions or
the velocities if the new size is bigger than the old one. In all the cases,
previous data is conserved. This function conserve the presence or absence of
velocities.positions
(frame::Frame)¶Frame
as an array. The positions are readable and
writable from this array. If the frame is resized (by writing to it, or calling
resize!
), the array is invalidated.velocities
(frame::Frame)¶Get the velocities in a Frame
as an array. The velocities are readable and
writable from this array. If the frame is resized (by writing to it, or calling
resize!
), the array is invalidated.
If the frame do not have velocity, this function will error. You can use
add_velocities!
to add velocities to a frame before calling this function.
add_velocities!
(frame::Frame)¶frame
. The storage is initialized with the result of
size(frame)
as number of atoms. If the frame already have velocities, this
does nothing.has_velocities
(frame::Frame)¶frame
contains velocity data or not.add_atom!
(frame::Frame, atom::Atom, position::Vector{Float64}, velocity::Vector{Float64} = Float64[0.0, 0.0, 0.0])¶atom
and the corresponding position
and velocity
data to a
frame
.remove_atom!
(frame::Frame, index::Integer)¶Remove the atom
at index
from the frame
.
This modify all the atoms
indexes after index
, and invalidate any
array obtained using positions
or velocities
.
set_cell!
(frame::Frame, cell::UnitCell)¶cell
associated with a frame
.set_topology!
(frame::Frame, topology::Topology)¶topology
associated with a frame
.step
(frame::Frame)¶frame
step, i.e. the frame number in the trajectory.set_step!
(frame::Frame, step::Integer)¶frame
step to step
.guess_bonds!
(frame::Frame)¶frame
using a distance criteria.add_bond!
(frame::Frame, i::Integer, j::Integer, order = nothing)¶Frame
’s Topology
.remove_bond!
(frame::Frame, i::Integer, j::Integer)¶Frame
’s Topology
.add_residue!
(frame::Frame, residue::Residue)¶Frame
’s Topology
.distance
(frame::Frame, i::Integer, j::Integer)¶angle
(frame::Frame, i::Integer, j::Integer, k::Integer)¶dihedral
(frame::Frame, i::Integer, j::Integer, k::Integer, m::Integer)¶out_of_plane
(frame::Frame, i::Integer, j::Integer, k::Integer, m::Integer)¶property
(frame::Frame, name::String)¶set_property!
(frame::Frame, name::String, value)¶Frame
.properties_count
(frame::Frame)¶list_properties
(frame::Frame)¶