#include <BALL/MOLMEC/COMMON/snapShotManager.h>
List of all members.
Detailed Description
Snapshot management e.g. for MD simulations. This class manages a list of single SnapShot objects. Snapshots are numbered starting with 1.
Definition at line 33 of file snapShotManager.h.
Constructor & Destructor Documentation
BALL::SnapShotManager::SnapShotManager |
( |
|
) |
|
BALL::SnapShotManager::SnapShotManager |
( |
System * |
my_system, |
|
|
TrajectoryFile * |
my_snapshot_file = 0 | |
|
) |
| | |
Constructor for a system and trajectory file. The internal reference to a force field will be set to NULL
- Parameters:
-
| my_system | the system to bind this manager to |
| my_snapshot_file | an optional file containing a trajectory for the my_system's atoms |
This constructor expects a valid system, a valid force field and the name of a snapshot file. Any existing file of the given name will be overwritten.
- Parameters:
-
| my_system | the system to bind this manager to |
| my_force_field | the force field that is bound to the system |
| my_snapshot_file | a file containing a trajectory for the my_system's atoms |
This constructor expects a valid system, a valid force field and the name of a snapshot file. Any existing file of the given name will be overwritten.
- Parameters:
-
| my_system | the system to bind this manager to |
| my_force_field | the force field that is bound to the system |
| my_options | |
| filename | the name of the snapshot file |
virtual BALL::SnapShotManager::~SnapShotManager |
( |
|
) |
[virtual] |
Member Function Documentation
virtual bool BALL::SnapShotManager::applyFirstSnapShot |
( |
|
) |
[virtual] |
Read a the first SnapShot from the associated TrajectoryFile.
- Parameters:
-
| snapshot | a buffer for returning the snapshot |
- Returns:
- true if the snapshot could be read, false ow.
virtual bool BALL::SnapShotManager::applyLastSnapShot |
( |
|
) |
[virtual] |
This method applies the last SnapShot of the associated file i. e. writes all available data (positions, forces, etc.) from the SnapShot to the System. Note that a SnapShot does not need to have all data.
virtual bool BALL::SnapShotManager::applyNextSnapShot |
( |
|
) |
[virtual] |
Read a the next SnapShot from the associated TrajectoryFile and apply it to the system
- Parameters:
-
| snapshot | a buffer for returning the snapshot |
- Returns:
- true if the snapshot could be read, false ow.
virtual bool BALL::SnapShotManager::applySnapShot |
( |
Size |
number |
) |
[virtual] |
Read a certain SnapShot from a TrajectoryFile. This method tries to read SnapShot number number from the file
- Parameters:
-
| number | the number of the snapshot we want to read |
| snapshot | a buffer for returning the snapshot |
- Returns:
- true if the snapshot could be read, false ow.
double BALL::SnapShotManager::calculateKineticEnergy_ |
( |
|
) |
[protected] |
virtual void BALL::SnapShotManager::clear |
( |
|
) |
[virtual] |
void BALL::SnapShotManager::clearBuffer |
( |
|
) |
|
virtual void BALL::SnapShotManager::flushToDisk |
( |
|
) |
throw (File::CannotWrite) [virtual] |
This method writes all snapshots taken so far to hard disk
- Exceptions:
-
Position BALL::SnapShotManager::getCurrentSnapshotNumber |
( |
|
) |
const [inline] |
Size BALL::SnapShotManager::getFlushToDiskFrequency |
( |
|
) |
const |
Get the current frequency for doing saves to hard disk
- Returns:
- the number of snapshots to take before flushing them to disk
const ForceField* BALL::SnapShotManager::getForceField |
( |
|
) |
const |
get a const pointer to the force field
Size BALL::SnapShotManager::getNumberOfSnapShotsInBuffer |
( |
|
) |
[inline] |
System* BALL::SnapShotManager::getSystem |
( |
|
) |
const |
get a const pointer to the system member
get a pointer to the trajectory file
virtual bool BALL::SnapShotManager::isValid |
( |
|
) |
const [virtual] |
Is the SnapshotManager ready for use?
bool BALL::SnapShotManager::readFromFile |
( |
|
) |
|
void BALL::SnapShotManager::setFlushToDiskFrequency |
( |
Size |
number |
) |
|
Set the frequency for saving snapshots to hard disk. Every 'number' iterations, a save will be done.
- Parameters:
-
| number | the number of snapshots to take before flushing to disk |
void BALL::SnapShotManager::setForceField |
( |
const ForceField * |
my_ff |
) |
|
void BALL::SnapShotManager::setSystem |
( |
System * |
my_system |
) |
|
Set the system member
- Parameters:
-
| my_system | a const pointer to the system to which this SnapshotManager will be bound |
void BALL::SnapShotManager::setTrajectoryFile |
( |
TrajectoryFile * |
my_file |
) |
|
virtual bool BALL::SnapShotManager::setup |
( |
|
) |
[virtual] |
The setup method does all preparations necessary for using the SnapshotManager.
- Returns:
- true, if setup was succesful
This setup method sets all necessary members and calls setup afterwards. The internal force field reference is set to NULL.
- Parameters:
-
| my_system | the System to which we want to bind this SnapShotManager |
| my_snapshot_file | the trajectory file we want to use |
- Returns:
- true, if the setup was succesful, false ow.
This setup method sets all necessary members and calls setup afterwards.
- Parameters:
-
| my_system | the System to which we want to bind this SnapShotManager |
| my_force_field | the respective forcefield |
| my_snapshot_file | the trajectory file we want to use |
- Returns:
- true, if the setup was succesful, false ow.
virtual void BALL::SnapShotManager::takeSnapShot |
( |
|
) |
throw (File::CannotWrite) [virtual] |
This method takes a snapshot of the system's current state and stores it in main memory. If there is not sufficient space, the snapshots collected so far are flushed to hard disk. The first snapshot taken has index 1.
- Exceptions:
-
Member Data Documentation