mainchain_potential

Bindings for core::chemical::mainchain_potential namespace

class pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable

Bases: pybind11_builtins.pybind11_object

assign(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, : pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable) pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable

C++: core::chemical::mainchain_potential::MainchainScoreTable::operator=(const class core::chemical::mainchain_potential::MainchainScoreTable &) –> class core::chemical::mainchain_potential::MainchainScoreTable &

clear(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable) None

Reset this object completely.

C++: core::chemical::mainchain_potential::MainchainScoreTable::clear() –> void

clone(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable) pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable
Clone function: make a copy of this object and return

an owning pointer to the copy.

C++: core::chemical::mainchain_potential::MainchainScoreTable::clone() const –> class std::shared_ptr<class core::chemical::mainchain_potential::MainchainScoreTable>

draw_random_mainchain_torsion_values(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, torsions: pyrosetta.rosetta.utility.vector1_double) None
Given the cumulative distribution function (pre-calculated), draw a random set of mainchain torsion values

biased by the probability distribution.

output is in the range (-180, 180].

The dimensionality of the torsions vector will match the total degrees of freedom of the residue. If the mainchain potential is a function of fewer mainchain degrees of freedom, then those torsions on which the potential does NOT depend will have values of 0 in the torsions vector. Use the get_mainchain_torsions_covered() function to get the vector of mainchiain torsion indices that are covered.

C++: core::chemical::mainchain_potential::MainchainScoreTable::draw_random_mainchain_torsion_values(class utility::vector1<double, class std::allocator<double> > &) const –> void

energy(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords: pyrosetta.rosetta.utility.vector1_double) float

Access values in this MainchainScoreTable.

Note that the vector is deliberately not passed by reference. The function copies the vector and ensures that all coordinates are in the range [0, 360).

The full vector of mainchain torsions should be passed in. If the potential is a function of fewer degrees of freedom, this function will disregard the appropraite entries in the coords vector.

C++: core::chemical::mainchain_potential::MainchainScoreTable::energy(class utility::vector1<double, class std::allocator<double> >) const –> double

energy_tensor(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords: pyrosetta.rosetta.utility.vector1_unsigned_long) float

Access an entry in the energy tensor.

Note that bounds checking only occurs in debug mode!

Intended for unit testing.

C++: core::chemical::mainchain_potential::MainchainScoreTable::energy_tensor(const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &) const –> const double &

finalize_de_novo_scoretable_from_energies(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, kbt: float, normalize: bool) None

After the energies tensor has been populated, compute all derived data.

If “normalize” is true, the probabilities are normalized to 1, and the energies adjusted accordingly. (This has the effect of raising or lowering all of the energies by some constant.) If “symmetrize_gly_” is true, the tensors are made symmetric.

Sets initalized_ to true.

C++: core::chemical::mainchain_potential::MainchainScoreTable::finalize_de_novo_scoretable_from_energies(const double &, const bool) –> void

get_mainchain_torsions_covered(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable) pyrosetta.rosetta.utility.vector1_unsigned_long

Get a const reference to the vector of mainchain torsions indices that this mainchain potential covers.

For example, for an oligourea, this would return {1, 2, 3}, since the Rama maps for oligoureas cover phi, theta, and psi (mainchain torsions 1, 2, and 3, respectively), but not mu or omega (mainchain torsions 4 and 5).

C++: core::chemical::mainchain_potential::MainchainScoreTable::get_mainchain_torsions_covered() const –> const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &

get_mainchain_torsions_from_coords(*args, **kwargs)

Overloaded function.

  1. get_mainchain_torsions_from_coords(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords_in: pyrosetta.rosetta.utility.vector1_unsigned_long, torsions_out: pyrosetta.rosetta.utility.vector1_double) -> None

  2. get_mainchain_torsions_from_coords(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords_in: pyrosetta.rosetta.utility.vector1_unsigned_long, torsions_out: pyrosetta.rosetta.utility.vector1_double, offset_if_symmetric: bool) -> None

Given a vector of coordinates, get the corresponding vector of mainchain torsions.

Bounds-checking only in debug mode!

Offset is 0 if symmetrize_gly_ is false, 1/2 well if symmetrize_gly_ is true. Offset is only added if offset_if_symmetric is set to true.

C++: core::chemical::mainchain_potential::MainchainScoreTable::get_mainchain_torsions_from_coords(const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &, class utility::vector1<double, class std::allocator<double> > &, const bool) const –> void

gradient(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords_in: pyrosetta.rosetta.utility.vector1_double, gradient_out: pyrosetta.rosetta.utility.vector1_double) None

Get the gradient with respect to x1,x2,x3,…xn for this MainchainScoreTable.

The coordinates at which to evaluate the gradient.

The resulting gradient.

The full vector of mainchain torsions should be passed in. If the potential is a function of fewer degrees of freedom, this function will disregard the appropraite entries in the coords vector.

C++: core::chemical::mainchain_potential::MainchainScoreTable::gradient(class utility::vector1<double, class std::allocator<double> >, class utility::vector1<double, class std::allocator<double> > &) const –> void

increment_energy_coords(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords: pyrosetta.rosetta.utility.vector1_unsigned_long) bool

Given coordinates in the energy tensor, increment the coordinates.

Returns “true” if increment was successful, “false” if the end of the tensor has been reached.

C++: core::chemical::mainchain_potential::MainchainScoreTable::increment_energy_coords(class utility::vector1<unsigned long, class std::allocator<unsigned long> > &) const –> bool

initialize_for_de_novo_generation(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, restype: pyrosetta.rosetta.core.chemical.ResidueType, dimensions: pyrosetta.rosetta.utility.vector1_unsigned_long, mainchain_torsions_covered: pyrosetta.rosetta.utility.vector1_unsigned_long, symmetrize: bool) None

Initialize this object for on-the-fly generation of a mainchain scoretable.

Calls clear() first.

C++: core::chemical::mainchain_potential::MainchainScoreTable::initialize_for_de_novo_generation(const class core::chemical::ResidueType &, const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &, const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &, const bool) –> void

initialized(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable) bool

Has this MainchainScoreTable been initialized?

False if no score table has been read yet; true otherwise.

C++: core::chemical::mainchain_potential::MainchainScoreTable::initialized() const –> bool

parse_rama_map_file_shapovalov(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, filename: str, file_contents: str, res_type_name: str, use_polycubic_interpolation: bool) None

Parse a Shapovalov-style rama database file and set up this MainchainScoreTable.

Sets initialized_ to true.

The name of the file that was read. (Just used for output messages – this function does not file read).

The slurped contents of the file to parse.

The name of the ResidueType for which we’re reading data. Data lines for other residue types will be ignored.

If true, uses polycubic interpolation; if false, uses polylinear interpolation.

C++: core::chemical::mainchain_potential::MainchainScoreTable::parse_rama_map_file_shapovalov(const std::string &, const std::string &, const std::string &, const bool) –> void

set_energy(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, coords: pyrosetta.rosetta.utility.vector1_unsigned_long, energy_in: float) None

Set an entry in the energies tensor.

Bounds checking only in debug build!

C++: core::chemical::mainchain_potential::MainchainScoreTable::set_energy(const class utility::vector1<unsigned long, class std::allocator<unsigned long> > &, const double &) –> void

set_symmetrize_gly(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, setting_in: bool) None

Set whether we should symmetrize tables for glycine.

C++: core::chemical::mainchain_potential::MainchainScoreTable::set_symmetrize_gly(const bool) –> void

symmetrize_gly(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable) bool

Return whether we should symmetrize tables for glycine.

C++: core::chemical::mainchain_potential::MainchainScoreTable::symmetrize_gly() const –> bool

write_mainchain_scoretable_to_stream(self: pyrosetta.rosetta.core.chemical.mainchain_potential.MainchainScoreTable, outstream: pyrosetta.rosetta.std.stringstream) None

After the mainchain scoretable has been finalized, write it to a scorefile.

C++: core::chemical::mainchain_potential::MainchainScoreTable::write_mainchain_scoretable_to_stream(class std::basic_stringstream<char> &) const –> void