io

IO routines operating on PackedPose representations.

pyrosetta.distributed.io.pose_from_file(*args, **kwargs)

Overloaded function.

  1. pose_from_file(filename: str) -> pyrosetta.rosetta.core.pose.Pose

  2. pose_from_file(filename: str, read_fold_tree: bool) -> pyrosetta.rosetta.core.pose.Pose

  3. pose_from_file(filename: str, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> pyrosetta.rosetta.core.pose.Pose

Returns a PoseOP object from the Pose created from input

PDB <filename>

: in PyRosetta, this will return a Pose object

example(s):

pose = pose_from_file(“YFP.pdb”)

See also:

Pose PDBInfo make_pose_from_sequence pose_from_rcsb pose_from_sequence

C++: core::import_pose::pose_from_file(const std::string &, bool, enum core::import_pose::FileType) –> class std::shared_ptr<class core::pose::Pose>

  1. pose_from_file(filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> pyrosetta.rosetta.core.pose.Pose

Returns a PoseOP object from the Pose created from input

PDB <filename>, taking a set of custom ImportPoseOptions parameters.

: in PyRosetta, this will return a Pose object

example(s):

pose = pose_from_file(“YFP.pdb”)

See also:

Pose PDBInfo make_pose_from_sequence pose_from_rcsb pose_from_sequence

C++: core::import_pose::pose_from_file(const std::string &, const class core::import_pose::ImportPoseOptions &, bool, enum core::import_pose::FileType) –> class std::shared_ptr<class core::pose::Pose>

  1. pose_from_file(residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str) -> pyrosetta.rosetta.core.pose.Pose

  2. pose_from_file(residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, read_fold_tree: bool) -> pyrosetta.rosetta.core.pose.Pose

  3. pose_from_file(residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> pyrosetta.rosetta.core.pose.Pose

Returns a PoseOP object from the Pose created by reading the input

PDB <filename>, this constructor allows for a non-default ResidueTypeSet <residue_set>

C++: core::import_pose::pose_from_file(const class core::chemical::ResidueTypeSet &, const std::string &, bool, enum core::import_pose::FileType) –> class std::shared_ptr<class core::pose::Pose>

  1. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, options: core::import_pose::ImportPoseOptions) -> None

  2. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool) -> None

  3. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool, file_type: pyrosetta.rosetta.core.import_pose.FileType) -> None

C++: core::import_pose::pose_from_file(class core::pose::Pose &, const class core::chemical::ResidueTypeSet &, const std::string &, const class core::import_pose::ImportPoseOptions &, bool, enum core::import_pose::FileType) –> void

  1. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str) -> None

  2. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, read_fold_tree: bool) -> None

  3. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> None

Reads in data from input PDB <filename> and stores it in the Pose

<pose>, this constructor allows for a non-default ResidueTypeSet <residue_set>

C++: core::import_pose::pose_from_file(class core::pose::Pose &, const class core::chemical::ResidueTypeSet &, const std::string &, bool, enum core::import_pose::FileType) –> void

  1. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, filename: str) -> None

  2. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, filename: str, read_fold_tree: bool) -> None

  3. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, filename: str, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> None

Reads in data from input PDB <filename> and stores it in the Pose

<pose>, uses the FA_STANDARD ResidueTypeSet (fullatom) by default

: will use centroid if in::file::centroid_input is true

example(s):

pose_from_file(pose,”YFP.pdb”)

See also:

Pose PDBInfo

C++: core::import_pose::pose_from_file(class core::pose::Pose &, const std::string &, bool, enum core::import_pose::FileType) –> void

  1. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, filename: str, options: core::import_pose::ImportPoseOptions) -> None

  2. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool) -> None

  3. pose_from_file(pose: pyrosetta.rosetta.core.pose.Pose, filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> None

C++: core::import_pose::pose_from_file(class core::pose::Pose &, const std::string &, const class core::import_pose::ImportPoseOptions &, bool, enum core::import_pose::FileType) –> void

  1. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str) -> None

  2. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, read_fold_tree: bool) -> None

  3. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> None

Reads data from an input PDB containing multiple models named

<filename> and stores it in a vector of Pose objects named <poses> using ResidueTypeSet <residue_set>

C++: core::import_pose::pose_from_file(class utility::vector1<class core::pose::Pose, class std::allocator<class core::pose::Pose> > &, const class core::chemical::ResidueTypeSet &, const std::string &, bool, enum core::import_pose::FileType) –> void

  1. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, options: core::import_pose::ImportPoseOptions) -> None

  2. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool) -> None

  3. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str, options: core::import_pose::ImportPoseOptions, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> None

C++: core::import_pose::pose_from_file(class utility::vector1<class core::pose::Pose, class std::allocator<class core::pose::Pose> > &, const class core::chemical::ResidueTypeSet &, const std::string &, const class core::import_pose::ImportPoseOptions &, bool, enum core::import_pose::FileType) –> void

  1. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, filename: str) -> None

  2. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, filename: str, read_fold_tree: bool) -> None

  3. pose_from_file(poses: pyrosetta.rosetta.utility.vector1_core_pose_Pose, filename: str, read_fold_tree: bool, type: pyrosetta.rosetta.core.import_pose.FileType) -> None

Reads data from an input PDB containing multiple models named

<filename> and stores it in a vector of Pose objects named <poses> using the FA_STANDARD ResidueTypeSet (fullatom)

C++: core::import_pose::pose_from_file(class utility::vector1<class core::pose::Pose, class std::allocator<class core::pose::Pose> > &, const std::string &, bool, enum core::import_pose::FileType) –> void

pyrosetta.distributed.io.pose_from_pdbstring(*args, **kwargs)

Overloaded function.

  1. pose_from_pdbstring(pose: pyrosetta.rosetta.core.pose.Pose, pdbcontents: str) -> None

  2. pose_from_pdbstring(pose: pyrosetta.rosetta.core.pose.Pose, pdbcontents: str, filename: str) -> None

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

  1. pose_from_pdbstring(pose: pyrosetta.rosetta.core.pose.Pose, pdbcontents: str, options: core::import_pose::ImportPoseOptions) -> None

  2. pose_from_pdbstring(pose: pyrosetta.rosetta.core.pose.Pose, pdbcontents: str, options: core::import_pose::ImportPoseOptions, filename: str) -> None

C++: core::import_pose::pose_from_pdbstring(class core::pose::Pose &, const std::string &, const class core::import_pose::ImportPoseOptions &, const std::string &) –> void

  1. pose_from_pdbstring(pose: pyrosetta.rosetta.core.pose.Pose, pdbcontents: str, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, filename: str) -> None

C++: core::import_pose::pose_from_pdbstring(class core::pose::Pose &, const std::string &, const class core::chemical::ResidueTypeSet &, const std::string &) –> void

  1. pose_from_pdbstring(pose: pyrosetta.rosetta.core.pose.Pose, pdbcontents: str, residue_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, options: core::import_pose::ImportPoseOptions, filename: str) -> None

C++: core::import_pose::pose_from_pdbstring(class core::pose::Pose &, const std::string &, const class core::chemical::ResidueTypeSet &, const class core::import_pose::ImportPoseOptions &, const std::string &) –> void

pyrosetta.distributed.io.pose_from_sequence(seq, res_type='fa_standard', auto_termini=True)

Returns a Pose object generated from a single-letter sequence of amino acid residues in <seq> using the <res_type> ResidueType and creates N- and C- termini if <auto_termini> is set to True.

Unlike make_pose_from_sequence(), this method generates a default PDBInfo and sets all torsion angles to 180 degrees.

Example:

pose = pose_from_sequence(“THANKSEVAN”)

See also:

Pose make_pose_from_sequence() pose_from_file() pose_from_rcsb()

pyrosetta.distributed.io.poses_from_silent(silent_filename)

Returns an Iterator object which is composed of Pose objects from a silent file.

@atom-moyer

pyrosetta.distributed.io.to_output_record(inp)
pyrosetta.distributed.io.to_output_record(maybe_packed_dict: dict)
pyrosetta.distributed.io.to_output_record(container: set)
pyrosetta.distributed.io.to_output_record(container: tuple)
pyrosetta.distributed.io.to_output_record(container: list)
pyrosetta.distributed.io.to_output_record(generator: Generator)

Convert to an “archive” output record with scores, pdb string and packed string.

pyrosetta.distributed.io.to_pdbstring(inp)
pyrosetta.distributed.io.to_pdbstring(maybe_packed_dict: dict)
pyrosetta.distributed.io.to_pdbstring(container: set)
pyrosetta.distributed.io.to_pdbstring(container: tuple)
pyrosetta.distributed.io.to_pdbstring(container: list)
pyrosetta.distributed.io.to_pdbstring(generator: Generator)

Convert to pdb-formatted string with score and energy data.

pyrosetta.distributed.io.to_silent(inp, output_filename)

Takes a Pose, PackedPose, or a list and outputs them as a silent file. This currently only outputs to a binary silent file.

Inputs: poses: Pose object, PackedPose object or list of either. output_filename: The desired name of the output silent file.

Example: pyrosetta.distributed.io.to_silent(poses, “mydesigns.silent”)

The decoy name in your silent file is take from pose.pdb_info().name() To set a different decoy name, change it in your pose before calling this function. To change the name, you must have a Pose object, not a PackedPose Example: pose = pyrosetta.distributed.packed_pose.to_pose(packed_pose) pose.pdb_info().name(“my_tag”)

@srgerb