flexs.landscapes.rosetta

Defines the RosettaFolding landscape and problem registry.

class flexs.landscapes.rosetta.RosettaFolding(pdb_file, sigmoid_center, sigmoid_norm_value)[source]

Bases: flexs.landscape.Landscape

This oracle scores sequences using a fixed conformation design energy. In this case, both backbone and side chain conformations are fixed (no repacking).

In this setting, we have a 3-D structure that we’d like to design for (given by the PDB file), so we look for sequences that might stably fold to the given conformation.

The best way to query how well a sequence might fold to a given conformation is to run a folding simulation, but since that is so computationally intense, it is more common to simply calculate the energy of the sequence if it was forced to fold into the target 3-D structure.

This is just a proxy for folding stability, but it is often an effective one and is the approach used by RosettaDesign.

We use Rosetta’s centroid energy function instead of the full-atom one since it is less sensitive to switching out residues without repacking side-chain conformations.

We convert these energies to a maximization objective in the 0-1 scale by fitness = (-energy - sigmoid_center) / sigmoid_norm_value.

wt_pose[source]

The original PyRosetta pose object from the .pdb file. Call wt_pose.sequence() to get the wild type sequence.

get_folding_energy(sequence)[source]

Return rosetta folding energy of the given sequence in self.pose’s conformation.

flexs.landscapes.rosetta.registry()[source]

Return a dictionary of problems of the form: `{

“problem name”: {

“params”: …,

}`

where flexs.landscapes.RosettaFolding(**problem[“params”]) instantiates the rosetta folding landscape for the given set of parameters.

Returns

Problems in the registry.

Return type

dict