Package jgromacs.data
Class Trajectory
java.lang.Object
jgromacs.data.Trajectory
- All Implemented Interfaces:
Cloneable
Objects of this class represent a single trajectory
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new Trajectory objectTrajectory(String name) Constructs a new Trajectory object of given nameTrajectory(Structure structure) Constructs a new Trajectory object of given structureTrajectory(Structure[] ensemble) Constructs a new Trajectory object made from an ensemble of structures -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new frame to the trajectoryclone()Returns an identical Trajectory objectdoubleconvertFrameIndexToTime(int frameindex) Converts frame index to simulation timeintconvertTimeToFrameIndex(double time) Converts simulation time to frame indexbooleanReturns true if the two trajectories are identicalReturns the initial frame of trajectory as a PointListReturns the initial frame of trajectory as a StructuregetFrameAsPointList(int i) Returns frame #i of the trajectory as a PointList objectgetFrameAsStructure(int i) Returns frame #i of the trajectory as a Structure objectReturns frames of the trajectory as an ArrayList objectReturns the last frame of trajectory as a PointListReturns the last frame of trajectory as a StructureReturns the mean frame of trajectorygetName()Returns the name of trajectoryintReturns the number of atoms in the trajectoryintReturns the number of frames in the trajectoryintReturns the number of residues in the trajectorydoubleReturns the start time of trajectorygetSubTrajectory(int startframe, int endframe) Returns the subtrajectory between the given start and end framesgetSubTrajectory(int startframe, int endframe, int frequency) Returns the subtrajectory between the given start and end frames using the given sampling frequencygetSubTrajectory(FrameIndexSet framelist) Returns the subtrajectory defined by the given frame listgetSubTrajectory(IndexSet indices) Returns the subtrajectory defined by the given index setdoubleReturns the time step of trajectoryinthashCode()Returns hash codevoidremoveFrame(int i) Removes frame #i from the trajectoryvoidReplaces frame #i with a new framevoidSets the name of trajectoryvoidsetStartTime(double startTime) Sets the start time of trajectoryvoidsetStructure(Structure structure) Sets the structure described by the trajectoryvoidsetTimeStep(double timeStep) Sets the time step of trajectorytoString()Returns the String representation of trajectory
-
Constructor Details
-
Trajectory
public Trajectory()Constructs a new Trajectory object -
Trajectory
Constructs a new Trajectory object of given name -
Trajectory
Constructs a new Trajectory object of given structure -
Trajectory
Constructs a new Trajectory object made from an ensemble of structures
-
-
Method Details
-
getFrames
Returns frames of the trajectory as an ArrayList object- Returns:
- frames as an ArrayList
-
getFrameAsPointList
Returns frame #i of the trajectory as a PointList object- Returns:
- frame #i as a PointList
-
getFrameAsStructure
Returns frame #i of the trajectory as a Structure object- Returns:
- frame #i as a Structure
-
getNumberOfFrames
public int getNumberOfFrames()Returns the number of frames in the trajectory- Returns:
- number of frames
-
getName
Returns the name of trajectory- Returns:
- name of trajectory
-
setName
Sets the name of trajectory- Parameters:
name- name of trajectory
-
getStartTime
public double getStartTime()Returns the start time of trajectory- Returns:
- start time of trajectory
-
setStartTime
public void setStartTime(double startTime) Sets the start time of trajectory- Parameters:
startTime- start time of trajectory
-
getTimeStep
public double getTimeStep()Returns the time step of trajectory- Returns:
- time step of trajectory
-
setTimeStep
public void setTimeStep(double timeStep) Sets the time step of trajectory- Parameters:
timeStep- time step of trajectory
-
setStructure
Sets the structure described by the trajectory- Parameters:
structure- structure described by the trajectory
-
getMeanFrame
Returns the mean frame of trajectory- Returns:
- mean frame
-
getNumberOfAtoms
public int getNumberOfAtoms()Returns the number of atoms in the trajectory- Returns:
- number of atoms
-
getNumberOfResidues
public int getNumberOfResidues()Returns the number of residues in the trajectory- Returns:
- number of residues
-
getFirstFrameAsPointList
Returns the initial frame of trajectory as a PointList- Returns:
- initial frame
-
getFirstFrameAsStructure
Returns the initial frame of trajectory as a Structure- Returns:
- initial frame
-
getLastFrameAsPointList
Returns the last frame of trajectory as a PointList- Returns:
- last frame
-
getLastFrameAsStructure
Returns the last frame of trajectory as a Structure- Returns:
- last frame
-
addFrame
Adds a new frame to the trajectory- Parameters:
frame- new frame
-
removeFrame
public void removeFrame(int i) Removes frame #i from the trajectory -
setFrame
Replaces frame #i with a new frame- Parameters:
frame- new frame
-
convertFrameIndexToTime
public double convertFrameIndexToTime(int frameindex) Converts frame index to simulation time- Parameters:
frameindex- frame index- Returns:
- simulation time
-
convertTimeToFrameIndex
public int convertTimeToFrameIndex(double time) Converts simulation time to frame index- Parameters:
time- simulation time- Returns:
- frame index
-
getSubTrajectory
Returns the subtrajectory between the given start and end frames- Parameters:
startframe- start frameendframe- end frame- Returns:
- subtrajectory
-
getSubTrajectory
Returns the subtrajectory between the given start and end frames using the given sampling frequency- Parameters:
startframe- start frameendframe- end framefrequency- sampling frequency- Returns:
- subtrajectory
-
getSubTrajectory
Returns the subtrajectory defined by the given index set- Parameters:
indices- index set of subtrajectory- Returns:
- subtrajectory
-
getSubTrajectory
Returns the subtrajectory defined by the given frame list- Parameters:
framelist- frame list- Returns:
- subtrajectory
-
toString
Returns the String representation of trajectory -
equals
Returns true if the two trajectories are identical -
hashCode
public int hashCode()Returns hash code -
clone
Returns an identical Trajectory object
-