public class Trajectory
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
Trajectory()
Constructs a new Trajectory object
|
Trajectory(java.lang.String name)
Constructs a new Trajectory object of given name
|
Trajectory(Structure structure)
Constructs a new Trajectory object of given structure
|
Trajectory(Structure[] ensemble)
Constructs a new Trajectory object made from an ensemble of structures
|
Modifier and Type | Method and Description |
---|---|
void |
addFrame(PointList frame)
Adds a new frame to the trajectory
|
java.lang.Object |
clone()
Returns an identical Trajectory object
|
double |
convertFrameIndexToTime(int frameindex)
Converts frame index to simulation time
|
int |
convertTimeToFrameIndex(double time)
Converts simulation time to frame index
|
boolean |
equals(java.lang.Object other)
Returns true if the two trajectories are identical
|
PointList |
getFirstFrameAsPointList()
Returns the initial frame of trajectory as a PointList
|
Structure |
getFirstFrameAsStructure()
Returns the initial frame of trajectory as a Structure
|
PointList |
getFrameAsPointList(int i)
Returns frame #i of the trajectory as a PointList object
|
Structure |
getFrameAsStructure(int i)
Returns frame #i of the trajectory as a Structure object
|
java.util.ArrayList<PointList> |
getFrames()
Returns frames of the trajectory as an ArrayList object
|
PointList |
getLastFrameAsPointList()
Returns the last frame of trajectory as a PointList
|
Structure |
getLastFrameAsStructure()
Returns the last frame of trajectory as a Structure
|
PointList |
getMeanFrame()
Returns the mean frame of trajectory
|
java.lang.String |
getName()
Returns the name of trajectory
|
int |
getNumberOfAtoms()
Returns the number of atoms in the trajectory
|
int |
getNumberOfFrames()
Returns the number of frames in the trajectory
|
int |
getNumberOfResidues()
Returns the number of residues in the trajectory
|
double |
getStartTime()
Returns the start time of trajectory
|
Trajectory |
getSubTrajectory(FrameIndexSet framelist)
Returns the subtrajectory defined by the given frame list
|
Trajectory |
getSubTrajectory(IndexSet indices)
Returns the subtrajectory defined by the given index set
|
Trajectory |
getSubTrajectory(int startframe,
int endframe)
Returns the subtrajectory between the given start and end frames
|
Trajectory |
getSubTrajectory(int startframe,
int endframe,
int frequency)
Returns the subtrajectory between the given start and end frames using the given sampling frequency
|
double |
getTimeStep()
Returns the time step of trajectory
|
int |
hashCode()
Returns hash code
|
void |
removeFrame(int i)
Removes frame #i from the trajectory
|
void |
setFrame(int i,
PointList frame)
Replaces frame #i with a new frame
|
void |
setName(java.lang.String name)
Sets the name of trajectory
|
void |
setStartTime(double startTime)
Sets the start time of trajectory
|
void |
setStructure(Structure structure)
Sets the structure described by the trajectory
|
void |
setTimeStep(double timeStep)
Sets the time step of trajectory
|
java.lang.String |
toString()
Returns the String representation of trajectory
|
public Trajectory()
public Trajectory(java.lang.String name)
public Trajectory(Structure structure)
public Trajectory(Structure[] ensemble)
public java.util.ArrayList<PointList> getFrames()
public PointList getFrameAsPointList(int i)
public Structure getFrameAsStructure(int i)
public int getNumberOfFrames()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- name of trajectorypublic double getStartTime()
public void setStartTime(double startTime)
startTime
- start time of trajectorypublic double getTimeStep()
public void setTimeStep(double timeStep)
timeStep
- time step of trajectorypublic void setStructure(Structure structure)
structure
- structure described by the trajectorypublic PointList getMeanFrame()
public int getNumberOfAtoms()
public int getNumberOfResidues()
public PointList getFirstFrameAsPointList()
public Structure getFirstFrameAsStructure()
public PointList getLastFrameAsPointList()
public Structure getLastFrameAsStructure()
public void addFrame(PointList frame)
frame
- new framepublic void removeFrame(int i)
public void setFrame(int i, PointList frame)
frame
- new framepublic double convertFrameIndexToTime(int frameindex)
frameindex
- frame indexpublic int convertTimeToFrameIndex(double time)
time
- simulation timepublic Trajectory getSubTrajectory(int startframe, int endframe)
startframe
- start frameendframe
- end framepublic Trajectory getSubTrajectory(int startframe, int endframe, int frequency)
startframe
- start frameendframe
- end framefrequency
- sampling frequencypublic Trajectory getSubTrajectory(IndexSet indices)
indices
- index set of subtrajectorypublic Trajectory getSubTrajectory(FrameIndexSet framelist)
framelist
- frame listpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other trajectorypublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object