![]() |
Rosetta
2021.16
|
An object wrapper for reading atom_tree_diff files, complete with embedded reference structures. More...
#include <atom_tree_diff.hh>

Public Member Functions | |
| AtomTreeDiff () | |
| AtomTreeDiff (std::string filename) | |
| ~AtomTreeDiff () override | |
| bool | has_ref_pose (std::string const &tag) const |
| returns true if a reference struct with the given tag is present More... | |
| bool | has_tag (std::string const &tag) const |
| True if a (non-reference) structure with the given tag is present in the file. More... | |
| bool | has_ref_tag (std::string const &tag) const |
| ScoresPairList const & | scores () const |
| Return list of (pose tag, score sets) pairs for all poses, in file order. More... | |
| void | read_pose (std::string const &tag, core::pose::Pose &pose_out) |
| Reads the pose data from file and reconstructs the complete pose. More... | |
| void | read_pose (std::string const &tag, core::pose::Pose &pose_out, core::pose::Pose const &ref_pose) |
| Reads the pose data from file and reconstructs the complete pose, using the supplied reference pose. More... | |
| void | read_file (std::string filename) |
| core::pose::PoseCOP | ref_pose_for (std::string const &tag) |
| Returns the default reference pose for the given tag. Fails if none is available. More... | |
| core::pose::PoseOPs const & | all_ref_poses () const |
| Allows access to and mutation of (!) the references poses stored in this file. Use with caution. More... | |
| RefTags const & | get_ref_tags () const |
| TagScoreMap const & | get_tag_score_map () const |
| int | count (std::string const &tag) const |
Static Public Member Functions | |
| static void | sort_by (std::string const &score_name, ScoresPairList &scores, bool descending=false) |
| Utility function for selecting subsets of structures by score. More... | |
Private Member Functions | |
| AtomTreeDiff (AtomTreeDiff const &) | |
Private Attributes | |
| ScoresPairList | scores_ |
| RefTags | ref_tags_ |
| TagScoreMap | tag_idx_ |
| Maps tags to indices in scores_. More... | |
| std::map< std::string, long > | offsets_ |
| The map of (tag, file position) for getting random access to the structural data. More... | |
| std::map< std::string, core::pose::PoseOP > | ref_poses_ |
| The map of (tag, reference pose) for decoding the diffs. Some could be null. More... | |
| core::pose::PoseOPs | unique_ref_poses_ |
| All references poses from the file, one copy each for convenience. More... | |
| std::ifstream | in_ |
| bool | file_read_ |
An object wrapper for reading atom_tree_diff files, complete with embedded reference structures.
Only works with uncompressed files, because we have to be able to to random access (seekg) to pull out single structures in random order.
| core::import_pose::atom_tree_diffs::AtomTreeDiff::AtomTreeDiff | ( | ) |
| core::import_pose::atom_tree_diffs::AtomTreeDiff::AtomTreeDiff | ( | std::string | filename | ) |
References read_file().
|
override |
References in_.
|
private |
|
inline |
Allows access to and mutation of (!) the references poses stored in this file. Use with caution.
This exists to allow setup on stored reference poses for properties that don't get saved/restored in PDB format, like covalent constraints for enzyme design.
References unique_ref_poses_.
|
inline |
References ref_tags_.
|
inline |
References ref_tags_.
|
inline |
References tag_idx_.
| bool core::import_pose::atom_tree_diffs::AtomTreeDiff::has_ref_pose | ( | std::string const & | tag | ) | const |
returns true if a reference struct with the given tag is present
References ref_poses_.
| bool core::import_pose::atom_tree_diffs::AtomTreeDiff::has_ref_tag | ( | std::string const & | tag | ) | const |
References ref_poses_.
| bool core::import_pose::atom_tree_diffs::AtomTreeDiff::has_tag | ( | std::string const & | tag | ) | const |
True if a (non-reference) structure with the given tag is present in the file.
References tag_idx_.
| void core::import_pose::atom_tree_diffs::AtomTreeDiff::read_file | ( | std::string | filename | ) |
References core::sequence::end, file_read_, core::import_pose::atom_tree_diffs::header_from_atom_tree_diff(), in_, offsets_, core::import_pose::atom_tree_diffs::pose_from_atom_tree_diff(), ref_poses_, ref_tags_, scores(), scores_, protocols::loops::start, tag_idx_, and unique_ref_poses_.
Referenced by AtomTreeDiff().
| void core::import_pose::atom_tree_diffs::AtomTreeDiff::read_pose | ( | std::string const & | tag, |
| core::pose::Pose & | pose_out | ||
| ) |
Reads the pose data from file and reconstructs the complete pose.
References ref_poses_.
| void core::import_pose::atom_tree_diffs::AtomTreeDiff::read_pose | ( | std::string const & | tag, |
| core::pose::Pose & | pose_out, | ||
| core::pose::Pose const & | ref_pose | ||
| ) |
Reads the pose data from file and reconstructs the complete pose, using the supplied reference pose.
References core::import_pose::atom_tree_diffs::header_from_atom_tree_diff(), in_, offsets_, and core::import_pose::atom_tree_diffs::pose_from_atom_tree_diff().
| core::pose::PoseCOP core::import_pose::atom_tree_diffs::AtomTreeDiff::ref_pose_for | ( | std::string const & | tag | ) |
Returns the default reference pose for the given tag. Fails if none is available.
References ref_poses_.
|
inline |
Return list of (pose tag, score sets) pairs for all poses, in file order.
References scores_.
Referenced by read_file(), and protocols::ligand_docking::select_best_poses().
|
static |
Utility function for selecting subsets of structures by score.
Referenced by protocols::ligand_docking::select_best_poses().
|
mutableprivate |
Referenced by read_file().
|
private |
Referenced by read_file(), read_pose(), and ~AtomTreeDiff().
|
private |
The map of (tag, file position) for getting random access to the structural data.
Referenced by read_file(), and read_pose().
|
private |
The map of (tag, reference pose) for decoding the diffs. Some could be null.
Referenced by has_ref_pose(), has_ref_tag(), read_file(), read_pose(), and ref_pose_for().
|
private |
Maps reference tags to how many associated atom_tree_diff structs exist... int is needed here because there are 0 atom tree diffs to start with
Referenced by count(), get_ref_tags(), and read_file().
|
private |
The list of (tag,scores) pairs for the diffed structures, for efficient selection of subsets. (E.g. the top 5% by total score.) Memory cost is probably ~1 kb / structure.
Referenced by read_file(), and scores().
|
private |
Maps tags to indices in scores_.
Referenced by get_tag_score_map(), has_tag(), and read_file().
|
private |
All references poses from the file, one copy each for convenience.
Referenced by all_ref_poses(), and read_file().
1.8.7