atom_tree_diffs

Bindings for core::import_pose::atom_tree_diffs namespace

class pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff

Bases: pybind11_builtins.pybind11_object

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.

all_ref_poses(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff) pyrosetta.rosetta.utility.vector1_std_shared_ptr_core_pose_Pose_t

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.

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::all_ref_poses() const –> const class utility::vector1<class std::shared_ptr<class core::pose::Pose>, class std::allocator<class std::shared_ptr<class core::pose::Pose> > > &

count(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str) int

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::count(const std::string &) const –> int

get_ref_tags(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff) pyrosetta.rosetta.std.map_std_string_int

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::get_ref_tags() const –> const class std::map<std::string, int, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, int> > > &

get_tag_score_map(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff) pyrosetta.rosetta.std.map_std_string_unsigned_long

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::get_tag_score_map() const –> const class std::map<std::string, unsigned long, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, unsigned long> > > &

has_ref_pose(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str) bool

returns true if a reference struct with the given tag is present

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::has_ref_pose(const std::string &) const –> bool

has_ref_tag(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str) bool

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::has_ref_tag(const std::string &) const –> bool

has_tag(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str) bool

True if a (non-reference) structure with the given tag is present in the file

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::has_tag(const std::string &) const –> bool

read_file(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, filename: str) None

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::read_file(std::string) –> void

read_pose(*args, **kwargs)

Overloaded function.

  1. read_pose(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str, pose_out: pyrosetta.rosetta.core.pose.Pose) -> None

Reads the pose data from file and reconstructs the complete pose.

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::read_pose(const std::string &, class core::pose::Pose &) –> void

  1. read_pose(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str, pose_out: pyrosetta.rosetta.core.pose.Pose, ref_pose: pyrosetta.rosetta.core.pose.Pose) -> None

Reads the pose data from file and reconstructs the complete pose, using the supplied reference pose.

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::read_pose(const std::string &, class core::pose::Pose &, const class core::pose::Pose &) –> void

ref_pose_for(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff, tag: str) pyrosetta.rosetta.core.pose.Pose

Returns the default reference pose for the given tag. Fails if none is available.

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::ref_pose_for(const std::string &) –> class std::shared_ptr<const class core::pose::Pose>

scores(self: pyrosetta.rosetta.core.import_pose.atom_tree_diffs.AtomTreeDiff) pyrosetta.rosetta.utility.vector1_std_pair_std_string_std_map_std_string_double_std_less_std_string_std_allocator_std_pair_const_std_string_double_t

Return list of (pose tag, score sets) pairs for all poses, in file order.

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::scores() const –> const class utility::vector1<struct std::pair<std::string, class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > >, class std::allocator<struct std::pair<std::string, class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > > > > &

static sort_by(*args, **kwargs)

Overloaded function.

  1. sort_by(score_name: str, scores: pyrosetta.rosetta.utility.vector1_std_pair_std_string_std_map_std_string_double_std_less_std_string_std_allocator_std_pair_const_std_string_double_t) -> None

  2. sort_by(score_name: str, scores: pyrosetta.rosetta.utility.vector1_std_pair_std_string_std_map_std_string_double_std_less_std_string_std_allocator_std_pair_const_std_string_double_t, descending: bool) -> None

Utility function for selecting subsets of structures by score.

C++: core::import_pose::atom_tree_diffs::AtomTreeDiff::sort_by(const std::string &, class utility::vector1<struct std::pair<std::string, class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > >, class std::allocator<struct std::pair<std::string, class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > > > > &, bool) –> void

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.dump_atom_tree_diff(*args, **kwargs)

Overloaded function.

  1. dump_atom_tree_diff(out: pyrosetta.rosetta.std.ostream, pose_tag: str, scores: pyrosetta.rosetta.std.map_std_string_double, ref_pose_in: pyrosetta.rosetta.core.pose.Pose, pose: pyrosetta.rosetta.core.pose.Pose) -> None

  2. dump_atom_tree_diff(out: pyrosetta.rosetta.std.ostream, pose_tag: str, scores: pyrosetta.rosetta.std.map_std_string_double, ref_pose_in: pyrosetta.rosetta.core.pose.Pose, pose: pyrosetta.rosetta.core.pose.Pose, bb_precision: int) -> None

  3. dump_atom_tree_diff(out: pyrosetta.rosetta.std.ostream, pose_tag: str, scores: pyrosetta.rosetta.std.map_std_string_double, ref_pose_in: pyrosetta.rosetta.core.pose.Pose, pose: pyrosetta.rosetta.core.pose.Pose, bb_precision: int, sc_precision: int) -> None

  4. dump_atom_tree_diff(out: pyrosetta.rosetta.std.ostream, pose_tag: str, scores: pyrosetta.rosetta.std.map_std_string_double, ref_pose_in: pyrosetta.rosetta.core.pose.Pose, pose: pyrosetta.rosetta.core.pose.Pose, bb_precision: int, sc_precision: int, bondlen_precision: int) -> None

Encodes pose relative to ref_pose by noting which atom_tree DOFs are different.

C++: core::import_pose::atom_tree_diffs::dump_atom_tree_diff(std::ostream &, const std::string &, const class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > &, const class core::pose::Pose &, const class core::pose::Pose &, int, int, int) –> void

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.dump_reference_pose(out: pyrosetta.rosetta.std.ostream, pose_tag: str, scores: pyrosetta.rosetta.std.map_std_string_double, pose: pyrosetta.rosetta.core.pose.Pose) None

Embeds a reference pose as PDB coords + foldtree; will be used for reconstructing subsequent diffs.

C++: core::import_pose::atom_tree_diffs::dump_reference_pose(std::ostream &, const std::string &, const class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > &, const class core::pose::Pose &) –> void

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.dump_score_line(out: pyrosetta.rosetta.std.ostream, pose_tag: str, scores: pyrosetta.rosetta.std.map_std_string_double) None

Helper function for writing entries – not usually called by clients.

C++: core::import_pose::atom_tree_diffs::dump_score_line(std::ostream &, const std::string &, const class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > &) –> void

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.file_is_atom_tree_diff(*args, **kwargs)

Overloaded function.

  1. file_is_atom_tree_diff(filename: str) -> bool

Test if given file is an atom_tree_diff

C++: core::import_pose::atom_tree_diffs::file_is_atom_tree_diff(const std::string &) –> bool

  1. file_is_atom_tree_diff(in: pyrosetta.rosetta.std.istream) -> bool

Test if given stream is an atom_tree_diff

If everything goes right, after the call, the read position should be at the same place it was to start with

C++: core::import_pose::atom_tree_diffs::file_is_atom_tree_diff(std::istream &) –> bool

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.header_from_atom_tree_diff(in: pyrosetta.rosetta.std.istream, pose_tag_out: str, scores_out: pyrosetta.rosetta.std.map_std_string_double) bool
Gets next tag and scores from the stream, or returns false if none.

Call this to find desired structure, then call pose_from_atom_tree_diff().

C++: core::import_pose::atom_tree_diffs::header_from_atom_tree_diff(std::istream &, std::string &, class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > &) –> bool

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.map_of_weighted_scores(pose: pyrosetta.rosetta.core.pose.Pose, sfxn: pyrosetta.rosetta.core.scoring.ScoreFunction, scores_out: pyrosetta.rosetta.std.map_std_string_double) None

Helper for dump_atom_tree_diff(), fills map with weighted score terms.

C++: core::import_pose::atom_tree_diffs::map_of_weighted_scores(class core::pose::Pose &, const class core::scoring::ScoreFunction &, class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > &) –> void

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.pose_from_atom_tree_diff(in: pyrosetta.rosetta.std.istream, ref_pose: pyrosetta.rosetta.core.pose.Pose, pose: pyrosetta.rosetta.core.pose.Pose) bool
Sets pose = ref_pose and then starts modifying DOFs in pose to recreate a saved structure.

Call after header_from_atom_tree_diff(). Returns false on error.

C++: core::import_pose::atom_tree_diffs::pose_from_atom_tree_diff(std::istream &, const class core::pose::Pose &, class core::pose::Pose &) –> bool

pyrosetta.rosetta.core.import_pose.atom_tree_diffs.rms_error_with_noise(*args, **kwargs)

Overloaded function.

  1. rms_error_with_noise(ref_pose: pyrosetta.rosetta.core.pose.Pose) -> None

  2. rms_error_with_noise(ref_pose: pyrosetta.rosetta.core.pose.Pose, bb_precision: int) -> None

  3. rms_error_with_noise(ref_pose: pyrosetta.rosetta.core.pose.Pose, bb_precision: int, sc_precision: int) -> None

For use in deciding how many digits of precision you need when diffing an atom tree.

C++: core::import_pose::atom_tree_diffs::rms_error_with_noise(const class core::pose::Pose &, int, int) –> void