Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::trajectory::DbTrajectoryWriter Class Reference

#include <DbTrajectoryWriter.hh>

Inheritance diagram for protocols::trajectory::DbTrajectoryWriter:
Inheritance graph
[legend]

Classes

struct  Frame
 

Public Member Functions

 DbTrajectoryWriter (core::Size job_id, core::pose::Pose const &pose, core::Size frequency=1, core::Size cache_limit=200)
 Constructor. The given pose will be recorded as the first frame in the trajectory. Some performance settings can optionally be given. More...
 
void set_frequency (core::Size setting)
 Specify that a pose should be saved once every N iterations. More...
 
void set_cache_limit (core::Size setting)
 Specify the number of poses that can be cached. More...
 
void update (core::pose::Pose const &pose)
 Add the given pose to the trajectory being saved. More...
 
void finalize () const
 Make sure any cached poses have been saved. More...
 

Private Member Functions

void write_schema_to_db () const
 Generate the table schemas and write them to the database. More...
 
void write_cache_to_db () const
 Write any cached poses into the database, then clear the cache. More...
 

Private Attributes

core::Size job_id_
 
core::Size iteration_
 
core::Size frequency_
 
core::Size cache_limit_
 
utility::vector1< Frameframe_cache_
 

Constructor & Destructor Documentation

protocols::trajectory::DbTrajectoryWriter::DbTrajectoryWriter ( core::Size  job_id,
core::pose::Pose const &  pose,
core::Size  frequency = 1,
core::Size  cache_limit = 200 
)

Constructor. The given pose will be recorded as the first frame in the trajectory. Some performance settings can optionally be given.

Member Function Documentation

void protocols::trajectory::DbTrajectoryWriter::finalize ( ) const

Make sure any cached poses have been saved.

void protocols::trajectory::DbTrajectoryWriter::set_cache_limit ( core::Size  setting)

Specify the number of poses that can be cached.

void protocols::trajectory::DbTrajectoryWriter::set_frequency ( core::Size  setting)

Specify that a pose should be saved once every N iterations.

void protocols::trajectory::DbTrajectoryWriter::update ( core::pose::Pose const &  pose)

Add the given pose to the trajectory being saved.

This method should be called on every iteration. If you don't want to actually store a frame every iteration, the optional frequency argument to the constructor can be used to specify how often frames should be recorded.

References protocols::trajectory::DbTrajectoryWriter::Frame::iteration, and protocols::trajectory::DbTrajectoryWriter::Frame::pose.

void protocols::trajectory::DbTrajectoryWriter::write_cache_to_db ( ) const
private

Write any cached poses into the database, then clear the cache.

References core::io::silent::SilentFileData::_write_silent_struct(), and protocols::hybridization::score.

void protocols::trajectory::DbTrajectoryWriter::write_schema_to_db ( ) const
private

Generate the table schemas and write them to the database.

References protocols::hybridization::score.

Member Data Documentation

core::Size protocols::trajectory::DbTrajectoryWriter::cache_limit_
private
utility::vector1<Frame> protocols::trajectory::DbTrajectoryWriter::frame_cache_
mutableprivate
core::Size protocols::trajectory::DbTrajectoryWriter::frequency_
private
core::Size protocols::trajectory::DbTrajectoryWriter::iteration_
private
core::Size protocols::trajectory::DbTrajectoryWriter::job_id_
private

The documentation for this class was generated from the following files: