pose

class pyrosetta.bindings.pose.PoseResidueAccessor(pose)

Bases: collections.abc.Sized, collections.abc.Iterable

Accessor wrapper for pose objects providing a collection-like interface.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 41
_abc_registry = <_weakrefset.WeakSet object>
class pyrosetta.bindings.pose.PoseResidueLabelAccessor(pose)

Bases: object

Accessor wrapper for a pose’s residue labels as a 1-indexed-collection of sets.

_repr_pretty_(p, cycle)

IPython-display representation.

property mask
pose
class pyrosetta.bindings.pose.PoseResidueLabelMaskAccessor(label_accessor)

Bases: collections.abc.Mapping

Accessor wrapper for residue label masks.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 41
_abc_registry = <_weakrefset.WeakSet object>
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
label_accessor
values() an object providing a view on D's values
class pyrosetta.bindings.pose.PoseScoreAccessor(pose)

Bases: collections.abc.MutableMapping

Accessor wrapper for pose energies and extra scores.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 41
_abc_registry = <_weakrefset.WeakSet object>
_repr_pretty_(p, cycle)

IPython-display representation.

_reserved = {'DFIRE', 'FaMPAsymEzCB', 'FaMPAsymEzCG', 'FaMPEnv', 'FaMPEnvSmooth', 'FaMPSolv', 'Hpol_bond_geometry', 'MPCbeta', 'MPEnv', 'MPHelicality', 'MPLipo', 'MPNonHelix', 'MPPair', 'MPResidueLipophilicity', 'MPTMProj', 'MPTermini', 'Mcbeta', 'Menv', 'Menv_non_helix', 'Menv_smooth', 'Menv_termini', 'Menv_tm_proj', 'Mlipo', 'Mpair', 'PB_elec', 'ProQ', 'ProQM', 'PyRosettaEnergy_first', 'PyRosettaEnergy_last', 'PyRosettaTwoBodyContextDependentEnergy_first', 'PyRosettaTwoBodyContextDependentEnergy_last', 'PyRosettaTwoBodyContextIndepenedentEnergy_first', 'PyRosettaTwoBodyContextIndepenedentEnergy_last', 'aa_cmp', 'aa_composition', 'aa_repeat', 'abego', 'alignment', 'angle_constraint', 'approximate_buried_unsat_penalty', 'arg_cation_pi', 'aromatic_restraint', 'aspartimide_penalty', 'atom_pair_constraint', 'backbone_stub_constraint', 'backbone_stub_linear_constraint', 'base_pair_constraint', 'big_bin_constraint', 'bond_geometry', 'branch_conn', 'burial', 'burial_v2', 'buried_unsatisfied_penalty', 'cart_bonded', 'cart_bonded_angle', 'cart_bonded_improper', 'cart_bonded_length', 'cart_bonded_proper', 'cart_bonded_ring', 'cart_bonded_torsion', 'cbeta', 'cbeta_smooth', 'ccs_imms', 'cen_env_smooth', 'cen_hb', 'cen_pair_motif_degree', 'cen_pair_motifs', 'cen_pair_smooth', 'cen_rot_cbeta', 'cen_rot_dun', 'cen_rot_env', 'cen_rot_pair', 'cen_rot_pair_ang', 'cen_rot_pair_dih', 'cenpack', 'cenpack_smooth', 'ch_bond', 'ch_bond_bb_bb', 'ch_bond_bb_sc', 'ch_bond_sc_sc', 'chainbreak', 'co', 'coarse_beadlj', 'coarse_chainbreak_constraint', 'coarse_fa_atr', 'coarse_fa_rep', 'coarse_fa_sol', 'constant_constraint', 'coordinate_constraint', 'covalent_labeling', 'covalent_labeling_fa', 'csa', 'custom_atom_pair', 'd2h_sa', 'dab_sasa', 'dab_sev', 'dc', 'depc_ms', 'dihedral_constraint', 'distance_chainbreak', 'dna_base_distance', 'dna_bb_torsion', 'dna_bp', 'dna_bs', 'dna_chi', 'dna_dihedral_bb', 'dna_dihedral_chi', 'dna_dihedral_sugar', 'dna_dr', 'dna_env', 'dna_pair', 'dna_ref', 'dna_sugar_close', 'dock_ens_conf', 'dof_constraint', 'dslf_ca_dih', 'dslf_cbs_ds', 'dslf_cs_ang', 'dslf_fa13', 'dslf_fa13_ref', 'dslf_ss_dih', 'dslf_ss_dst', 'dslfc_RT', 'dslfc_ang', 'dslfc_bb_dih', 'dslfc_cb_dih', 'dslfc_cb_dst', 'dslfc_cen_dst', 'dslfc_rot', 'dslfc_trans', 'dummy_score_type', 'dump_trajectory', 'dunbrack_constraint', 'e_pH', 'elec_dens_atomwise', 'elec_dens_fast', 'elec_dens_whole_structure_allatom', 'elec_dens_whole_structure_ca', 'elec_dens_window', 'end_of_score_type_enumeration', 'env', 'envsmooth', 'epr_deer_score', 'fa_atr', 'fa_atr_dummy', 'fa_atr_ref', 'fa_cust_pair_dist', 'fa_dun', 'fa_dun_dev', 'fa_dun_dev_ref', 'fa_dun_ref', 'fa_dun_rot', 'fa_dun_rot_ref', 'fa_dun_semi', 'fa_dun_semi_ref', 'fa_elec', 'fa_elec_aro_all', 'fa_elec_aro_aro', 'fa_elec_bb_bb', 'fa_elec_bb_sc', 'fa_elec_ref', 'fa_elec_rna_base_base', 'fa_elec_rna_base_base_fast', 'fa_elec_rna_phos_base', 'fa_elec_rna_phos_base_fast', 'fa_elec_rna_phos_phos', 'fa_elec_rna_phos_phos_fast', 'fa_elec_rna_phos_sugr', 'fa_elec_rna_phos_sugr_fast', 'fa_elec_rna_sugr_base', 'fa_elec_rna_sugr_base_fast', 'fa_elec_rna_sugr_sugr', 'fa_elec_rna_sugr_sugr_fast', 'fa_elec_sc_sc', 'fa_grpelec', 'fa_intra_RNA_base_phos_atr', 'fa_intra_RNA_base_phos_rep', 'fa_intra_RNA_base_phos_sol', 'fa_intra_atr', 'fa_intra_atr_nonprotein', 'fa_intra_atr_ref', 'fa_intra_atr_xover4', 'fa_intra_elec', 'fa_intra_rep', 'fa_intra_rep_nonprotein', 'fa_intra_rep_ref', 'fa_intra_rep_xover4', 'fa_intra_sol', 'fa_intra_sol_nonprotein', 'fa_intra_sol_ref', 'fa_intra_sol_xover4', 'fa_mbenv', 'fa_mbsolv', 'fa_pair', 'fa_pair_aro_aro', 'fa_pair_aro_pol', 'fa_pair_pol_pol', 'fa_rep', 'fa_rep_dummy', 'fa_rep_ref', 'fa_sasa', 'fa_sol', 'fa_sol_dummy', 'fa_sol_ref', 'fa_stack', 'fa_stack_aro', 'fa_stack_ext', 'fa_stack_lower', 'fa_stack_lr', 'fa_stack_rna_protein', 'fa_stack_rna_protein_aro', 'fa_stack_sol', 'fa_stack_upper', 'fa_vdw_tinker', 'fa_water_to_bilayer', 'facts_elec', 'facts_sasa', 'facts_solv', 'fastsaxs', 'fiberdiffraction', 'fiberdiffractiondens', 'free_2HOprime', 'free_base', 'free_dof', 'free_res', 'free_side_chain', 'free_suite', 'gauss', 'gb_elec', 'gen_bonded', 'gen_bonded_angle', 'gen_bonded_bond', 'gen_bonded_improper', 'gen_bonded_torsion', 'geom_sol', 'geom_sol_fast', 'geom_sol_fast_intra_RNA', 'geom_sol_intra_RNA', 'goap', 'goap_angle', 'goap_dist', 'grid_vdw', 'h2o_hbond', 'h2o_intra', 'hack_aro', 'hbnet', 'hbond', 'hbond_bb_sc', 'hbond_intra', 'hbond_lr_bb', 'hbond_lr_bb_sc', 'hbond_ref', 'hbond_sc', 'hbond_sr_bb', 'hbond_sr_bb_sc', 'hbond_wat', 'hoh_ref', 'holes', 'holes_decoy', 'holes_min', 'holes_min_mean', 'holes_resl', 'hpatch', 'hrf_dynamics', 'hrf_ms_labeling', 'hs_pair', 'hxl_tors', 'hybrid_vdw', 'interchain_contact', 'interchain_env', 'interchain_pair', 'interchain_vdw', 'interface_dd_pair', 'intermol', 'linear_branch_conn', 'linear_chainbreak', 'lk_ball', 'lk_ball_bridge', 'lk_ball_bridge2', 'lk_ball_bridge_uncpl', 'lk_ball_bridge_uncpl2', 'lk_ball_iso', 'lk_ball_wtd', 'lk_costheta', 'lk_dome', 'lk_dome_bridge', 'lk_dome_bridge_uncpl', 'lk_dome_iso', 'lk_dome_pack', 'lk_hack', 'lk_nonpolar', 'lk_nonpolar_intra_RNA', 'lk_polar', 'lk_polar_intra_RNA', 'loop_close', 'membrane_span_constraint', 'membrane_span_term_z_constraint', 'metalbinding_constraint', 'metalhash_constraint', 'mg', 'mg_lig', 'mg_ref', 'mg_sol', 'mhc_epitope', 'missing_res', 'mm_bend', 'mm_lj_inter_atr', 'mm_lj_inter_rep', 'mm_lj_intra_atr', 'mm_lj_intra_atr_ref', 'mm_lj_intra_rep', 'mm_lj_intra_rep_ref', 'mm_stretch', 'mm_twist', 'mm_twist_ref', 'motif_dock', 'mp_span_ang', 'multipole_elec', 'n_ci_2b_score_types', 'n_score_types', 'n_shortranged_2b_score_types', 'name', 'natbias_hh', 'natbias_hs', 'natbias_ss', 'natbias_stwist', 'neigh_count', 'neigh_vect', 'neigh_vect_raw', 'netcharge', 'nmer_pssm', 'nmer_ref', 'nmer_svm', 'nmr_pcs', 'nmr_pre', 'nmr_rdc', 'npd_hbond', 'npd_hbond_bb_sc', 'npd_hbond_intra', 'npd_hbond_lr_bb', 'npd_hbond_lr_bb_sc', 'npd_hbond_sc', 'npd_hbond_sr_bb', 'npd_hbond_sr_bb_sc', 'occ_sol_exact', 'occ_sol_fitted', 'occ_sol_fitted_onebody', 'omega', 'omega_ref', 'orbitals_hpol_bb', 'other_pose', 'overlap_chainbreak', 'p_aa', 'p_aa_pp', 'p_aa_pp_ref', 'p_aa_ss', 'paa_abego3', 'pack_stat', 'pair', 'pci_cation_pi', 'pci_hbond', 'pci_pi_pi', 'pci_salt_bridge', 'pcs', 'pcs2', 'pcsTs1', 'pcsTs2', 'pcsTs3', 'pcsTs4', 'pddf_score', 'peptide_bond', 'pocket_constraint', 'pointwater', 'pro_close', 'pro_close_ref', 'python', 'rama', 'rama2b', 'rama_prepro', 'rama_ref', 'rdc', 'rdc_rohl', 'rdc_segments', 'ref', 'ref_nc', 'res_type_constraint', 'res_type_linking_constraint', 'rg', 'rg_local', 'ring_close', 'rms', 'rna_backbone_backbone', 'rna_base_axis', 'rna_base_axis_pairwise', 'rna_base_backbone', 'rna_base_pair', 'rna_base_pair_pairwise', 'rna_base_stack', 'rna_base_stack_axis', 'rna_base_stack_axis_pairwise', 'rna_base_stack_pairwise', 'rna_base_stagger', 'rna_base_stagger_pairwise', 'rna_bond_geometry', 'rna_bulge', 'rna_chem_map', 'rna_chem_map_lores', 'rna_chem_shift', 'rna_coarse_dist', 'rna_data_backbone', 'rna_data_base', 'rna_fa_atr_base', 'rna_fa_rep_base', 'rna_jr_suite', 'rna_mg_point', 'rna_mg_point_indirect', 'rna_motif', 'rna_partition', 'rna_repulsive', 'rna_rg', 'rna_stub_coord_hack', 'rna_sugar_close', 'rna_suite', 'rna_torsion', 'rna_torsion_sc', 'rna_vdw', 'rnp_aa_to_rna_backbone', 'rnp_base_pair', 'rnp_env', 'rnp_pair', 'rnp_pair_dist', 'rnp_stack', 'rnp_stack_xy', 'rnp_vdw', 'rsigma', 'sa', 'sap_constraint', 'saxs_cen_score', 'saxs_fa_score', 'saxs_score', 'seqdep_ref', 'sheet', 'sidechain_neighbors', 'site_constraint', 'span_ins', 'special_rot', 'split_unfolded_two_body', 'ss_contact_worst', 'ss_pair', 'stack_elec', 'stack_elec_base_base', 'stack_elec_base_bb', 'suck', 'sugar_bb', 'suiteness_bonus', 'surface', 'symE_bonus', 'sym_lig', 'target_clash', 'tna_suite', 'total_score', 'unfolded', 'vdw', 'voids_penalty', 'wat_desolv', 'wat_entropy', 'xtal_ml', 'xtal_rfree', 'xtal_rwork', 'yhh_planarity'}
property all
clear()

Clear pose energies, extra scores, and SimpleMetric data

property energies
property extra
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

pose
setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
class pyrosetta.bindings.pose.ResidueLabelAccessor(pdb_info, res)

Bases: collections.abc.MutableSet

Accessor wrapper for a single residue’s labels providing a mutable-set interface.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 41
_abc_registry = <_weakrefset.WeakSet object>
classmethod _from_iterable(it)

Construct an instance of the class from any iterable input.

Must override this method if the class constructor signature does not accept an iterable for an input.

_hash()

Compute the hash value of a set.

Note that we don’t define __hash__: not all sets are hashable. But if you define a hashable set type, its __hash__ should call this function.

This must be compatible __eq__.

All sets ought to compare equal if they contain the same elements, regardless of how they are implemented, and regardless of the order of the elements; so there’s not much freedom for __eq__ or __hash__. We match the algorithm used by the built-in frozenset type.

_repr_pretty_(p, cycle)

IPython-display representation.

add(label)

Add an element.

clear()

This is slow (creates N new iterators!) but effective.

discard(label)

Remove an element. Do not raise an exception if absent.

isdisjoint(other)

Return True if two sets have a null intersection.

pdb_info
pop()

Return the popped value. Raise KeyError if empty.

remove(value)

Remove an element. If not a member, raise a KeyError.

res
pyrosetta.bindings.pose.apply_transform(self, xform)

Apply a homogeneous transform to the current pose.

Args:

xform (np.ndarray): A homogeneous transform.

pyrosetta.bindings.pose.display_secstruct(self, space=8, page=80)

Use DSSP to assign secondary structure codes to each residue in a Pose, store the result in the Pose, and display the result.

Args:
space (int): Spacing of residue number labels in display.

Defaults to 8.

page (int): Number of characters per line in dispaly.

Defaults to 80.

pyrosetta.bindings.pose.get_hbonds(self, calculate_derivative=False, exclude_bb=False, exclude_bsc=False, exclude_scb=False, exclude_sc=False)

Return the HBondSet for all hydrogen bonds in the Pose.

Args:

caclulate_derivative (bool): Defaults to False. exclube_bb (bool): Exclude backbone hydrogen bonds from the returned HBondSet.

Defaults to False.

exclube_bsc (bool): Exclude backbone–side-chain hydrogen bonds from the returned HBondSet.

Defaults to False.

exclube_scb (bool): Exclude side-chain–backbone hydrogen bonds from the returned HBondSet.

Defaults to False.

exclube_sc (bool): Exclude side-chain hydrogen bonds from the returned HBondSet.

Defaults to False.

Returns:

pyrosetta.rosetta.core.scoring.hbonds.HBondSet: THe selected hydrogen bonds in the Pose.

pyrosetta.bindings.pose.pdb_rsd(self, chain_and_resNo)

Look up a specific PDB-numbered residue and return it.

Args:
chain_and_resNo (tuple): a tuple representing the PDB description of the residue

in the format (chainID, resNo). For example, residue 1 on chain A would be (“A”, 1).

Returns:

pyrosetta.core.conformation.Residue or None: the Residue instance in the Pose. returns None if the PDB residue identifier is invalid.

pyrosetta.bindings.pose.residue_pairs(self, primary_residue_selector=<pyrosetta.rosetta.core.select.residue_selector.TrueResidueSelector object>, secondary_residue_selector=<pyrosetta.rosetta.core.select.residue_selector.TrueResidueSelector object>, neighborhood_distance_maximum=None, sequence_distance_minimum=None)

Iterate the permutations of residue pairs from two selections which are within a cartesian and/or outside a sequence distance cutoff.

The method uses the PrimarySequenceNeighborhoodSelector and NeighborhoodResidueSelector under the hood. Note that all _permutations_ of residues are yielded, not _combinations_. If you prefer combinations simply check if residue_pair[0].sequence_position() > residue_pair[1].sequence_position():.

primary_residue_selector - ResidueSelector secondary_residue_selector - ResidueSelector neighborhood_distance - float sequence_distance - int

return - iterator(tuple(Residue, Residue))

pyrosetta.bindings.pose.rotate(self, R)

Apply a rotation matrix to all of the coordinates in a Pose.

Args:

p (Pose): The Pose instance to manipulate R (np.mat): A rotation matrix to apply to the Pose coordinates

pyrosetta.bindings.pose.translate(self, t)

Apply a translation to all of the coordinates in a Pose.

Args:

p (Pose): The Pose instance to manipulate t (np.array): A vector to add to the Pose coordinates