Structs

Index

MolHandler.TrajectoryType

This struct corresponding to MD trajectory. This contains 4 fields like below.

  • coordinates : AbstractArray{Coordinate, 2}
  • attributes : Vector{Attribute}
  • natom : Number of atoms.
  • nframe : Number of frames in the trajectory.
  • box : Vector{Coordinate} of periodic box size for each frame

The column of coordinates matrix means one snapshot. The row of coordinates matrix means time series of one atom.

[ a d g j
  b e h k
  c f i l ]

In this case, one snapshot correspond to [a b c].

The constructor is below.

function Trajectory(coordinates::Array{Coordinate, 2};
                    attributes::Vector{Attribute} = [Attribute() for i=1:length(coordinates)],
                    box::Vector{Coordinate} = Vector{Coordinate}())
source
MolHandler.CoordinateType

This correspond to coordinate of atom. This contain 3 fields like below.

  • x <: Real
  • y <: Real
  • z <: Real

Some operators and functions were overloaded to make Coordinate objects broadcastable.

source
MolHandler.AttributeType

This struct mean all atomic information other than coordinates. This contains 5 fields like below.

  • resname : Union{String, Nothing}
  • resid : Union{Int64, Nothing}
  • atomname : Union{String, Nothing}
  • atomid : Union{Int64, Nothing}
  • mass : Union{Float32, Nothing}

The constructor is below.

function Attribute(;resname = nothing, resid = nothing,
                   atomname = nothing, atomid = nothing, mass = nothing)
source
MolHandler.AtomType

This struct have all information of corresponding atom. This contains 2 fields like below.

source