pyrosetta

pyrosetta._rosetta_database_from_env()

Read rosetta database directory from environment or standard install locations.

Database resolution proceeds by first searching the current installation for a ‘database’ or ‘rosetta_database’ path. If not found the search then continues to the users’s home dir, cygwin, and osx standard installation locations.

Returns database path if found, else None.

pyrosetta._is_interactive()

Determine if in an interactive context.

See: https://stackoverflow.com/questions/2356399/tell-if-python-is-in-interactive-mode

pyrosetta.init(options='-ex1 -ex2aro', extra_options='', set_logging_handler=None, notebook=None, silent=False)

Initialize Rosetta. Includes core data and global options.

options string with default Rosetta command-line options args.

(default: ‘-ex1 -ex2aro’)

kwargs -
extra_options - Extra command line options to pass rosetta init.

(default None)

set_logging_handler - Route rosetta tracing through logging logger ‘rosetta’:

None - Set handler if interactive, otherwise not. False - Write logs via c++-level filehandles. “interactive” - Register python log handling and make visible if not. “logging” - Register python log handling, do not update logging config. True - Register python log handling, make visible if logging isn’t configured.

Examples:

init() # uses default flags init(extra_options=’-pH’) # adds flags to supplement the default init(‘-pH -database /home/me/pyrosetta/rosetta_database’) # overrides default flags - be sure to include the dB last

pyrosetta._version_string()
pyrosetta._build_signature()
pyrosetta.version()
pyrosetta._vector_extend_func(vec, othervec)
pyrosetta.Vector1(list_in)

Creates a Vector1 object, deducing type from the given list.

pyrosetta.Set(list_in)

Creates a std::set object, deducing type from the given list.

pyrosetta.generate_nonstandard_residue_set(pose, params_list)

Places the ResidueTypes corresponding to a list of .params filenames into a given pose

.params files must be generated beforehand. Typically, one would obtain a molfile (.mdl) generated from the xyz coordinates of a residue, small molecule, or ion. The script molfile_to_params.py can be used to convert to a Rosetta-readable .params file. It can be found in the /test/tools folder of your PyRosetta installation or downloaded from the Rosetta Commons.

Example:

params = [“penicillin.params”, “amoxicillin.params”] pose = Pose() generate_nonstandard_residue_set(pose, params) pose_from_file(pose, “TEM-1_with_substrates.pdb”)

See also:

ResidueTypeSet Vector1() pose_from_file()

pyrosetta.standard_task_factory()
pyrosetta.standard_packer_task(pose)
class pyrosetta.CD(base, first, last, methods)

Bases: tuple

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('base', 'first', 'last', 'methods')
classmethod _make(iterable)

Make a new CD object from a sequence or iterable

_replace(**kwds)

Return a new CD object replacing specified fields with new values

base

Alias for field number 0

count(value, /)

Return number of occurrences of value.

first

Alias for field number 1

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

last

Alias for field number 2

methods

Alias for field number 3

pyrosetta.defineEnergyMethodCreator(class_, scoreType)
class pyrosetta.EnergyMethod(scoreName=None, scoreType=None, version=1)

Bases: object

Decorator function for custom EnergyMethods in PyRosetta.

__init__(scoreName=None, scoreType=None, version=1)