datacache

Bindings for basic::datacache namespace

class pyrosetta.rosetta.basic.datacache.BasicDataCache

Bases: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t

A DataCache storing objects derived from
basic::datacache::CacheableData.

See DataCache base class for usage details.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.BasicDataCache) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.BasicDataCache, n_slots: int) -> None
  3. __init__(self: pyrosetta.rosetta.basic.datacache.BasicDataCache, arg0: pyrosetta.rosetta.basic.datacache.BasicDataCache) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.BasicDataCache, rval: pyrosetta.rosetta.basic.datacache.BasicDataCache) → pyrosetta.rosetta.basic.datacache.BasicDataCache

copy assignment

C++: basic::datacache::BasicDataCache::operator=(const class basic::datacache::BasicDataCache &) –> class basic::datacache::BasicDataCache &

clear(*args, **kwargs)

Overloaded function.

  1. clear(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t) -> None

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::clear() –> void

  1. clear(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) -> None

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::clear(unsigned long) –> void

get(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) → basic::datacache::CacheableData

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::get(unsigned long) –> class basic::datacache::CacheableData &

get_const_ptr(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) → basic::datacache::CacheableData

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::get_const_ptr(unsigned long) const –> class std::shared_ptr<const class basic::datacache::CacheableData>

get_ptr(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) → basic::datacache::CacheableData

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::get_ptr(unsigned long) –> class std::shared_ptr<class basic::datacache::CacheableData>

get_raw_const_ptr(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) → basic::datacache::CacheableData

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::get_raw_const_ptr(unsigned long) const –> const class basic::datacache::CacheableData *

get_raw_ptr(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) → basic::datacache::CacheableData

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::get_raw_ptr(unsigned long) –> class basic::datacache::CacheableData *

has(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int) → bool

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::has(unsigned long) const –> bool

resize(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, n_slots: int) → None

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::resize(unsigned long) –> void

set(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t, slot: int, new_data: basic::datacache::CacheableData) → None

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::set(unsigned long, class std::shared_ptr<class basic::datacache::CacheableData>) –> void

size(self: pyrosetta.rosetta.basic.datacache.DataCache_basic_datacache_CacheableData_t) → int

C++: basic::datacache::DataCache<basic::datacache::CacheableData>::size() const –> unsigned long

class pyrosetta.rosetta.basic.datacache.CacheableData

Bases: pybind11_builtins.pybind11_object

base class for data storable within a DataCache

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableData, arg0: pyrosetta.rosetta.basic.datacache.CacheableData) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableData) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.CacheableData, : pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::operator=(const class basic::datacache::CacheableData &) –> class basic::datacache::CacheableData &

clone(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

class pyrosetta.rosetta.basic.datacache.CacheableString

Bases: pyrosetta.rosetta.basic.datacache.CacheableData

Wrapper for std::string

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableString, str: str) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableString, arg0: pyrosetta.rosetta.basic.datacache.CacheableString) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.CacheableString, : pyrosetta.rosetta.basic.datacache.CacheableString) → pyrosetta.rosetta.basic.datacache.CacheableString

C++: basic::datacache::CacheableString::operator=(const class basic::datacache::CacheableString &) –> class basic::datacache::CacheableString &

clone(self: pyrosetta.rosetta.basic.datacache.CacheableString) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableString::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

shared_from_this(self: pyrosetta.rosetta.basic.datacache.CacheableString) → pyrosetta.rosetta.basic.datacache.CacheableString

C++: basic::datacache::CacheableString::shared_from_this() –> class std::shared_ptr<class basic::datacache::CacheableString>

str(self: pyrosetta.rosetta.basic.datacache.CacheableString) → str

C++: basic::datacache::CacheableString::str() const –> const std::string &

class pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap

Bases: pyrosetta.rosetta.basic.datacache.CacheableData

Wrapper for std::map< std::string, float >

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap, arg0: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap, : pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap) → pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap

C++: basic::datacache::CacheableStringFloatMap::operator=(const class basic::datacache::CacheableStringFloatMap &) –> class basic::datacache::CacheableStringFloatMap &

clone(self: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableStringFloatMap::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

map(self: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap) → pyrosetta.rosetta.std.map_std_string_float

C++: basic::datacache::CacheableStringFloatMap::map() –> class std::map<std::string, float, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, float> > > &

shared_from_this(self: pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap) → pyrosetta.rosetta.basic.datacache.CacheableStringFloatMap

C++: basic::datacache::CacheableStringFloatMap::shared_from_this() –> class std::shared_ptr<class basic::datacache::CacheableStringFloatMap>

class pyrosetta.rosetta.basic.datacache.CacheableStringMap

Bases: pyrosetta.rosetta.basic.datacache.CacheableData

Wrapper for a map< string, string >.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableStringMap) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.CacheableStringMap, arg0: pyrosetta.rosetta.basic.datacache.CacheableStringMap) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.CacheableStringMap, : pyrosetta.rosetta.basic.datacache.CacheableStringMap) → pyrosetta.rosetta.basic.datacache.CacheableStringMap

C++: basic::datacache::CacheableStringMap::operator=(const class basic::datacache::CacheableStringMap &) –> class basic::datacache::CacheableStringMap &

clone(self: pyrosetta.rosetta.basic.datacache.CacheableStringMap) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableStringMap::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

map(self: pyrosetta.rosetta.basic.datacache.CacheableStringMap) → pyrosetta.rosetta.std.map_std_string_std_string

C++: basic::datacache::CacheableStringMap::map() –> class std::map<std::string, std::string, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, std::string > > > &

shared_from_this(self: pyrosetta.rosetta.basic.datacache.CacheableStringMap) → pyrosetta.rosetta.basic.datacache.CacheableStringMap

C++: basic::datacache::CacheableStringMap::shared_from_this() –> class std::shared_ptr<class basic::datacache::CacheableStringMap>

class pyrosetta.rosetta.basic.datacache.ConstDataMap

Bases: pybind11_builtins.pybind11_object

general-purpose store for any kind of object with the particular copy semantics of copying by value. This is effectively a map of string pairs to (constant) pointers. The first string represents the category of the object, and the second being a name for that particular object. The guarantee with the ConstDataMap is that if an object is put into the map, it may be read from, but it will not be changed underneath you. Data stored in the ConstDataMap can safely be shared between threads.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(self: pyrosetta.rosetta.basic.datacache.ConstDataMap, rhs: pyrosetta.rosetta.basic.datacache.ConstDataMap) → bool

Performs pointer comparison to determine if these two maps point at the same data.

C++: basic::datacache::ConstDataMap::operator==(const class basic::datacache::ConstDataMap &) const –> bool

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.ConstDataMap) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.ConstDataMap, arg0: pyrosetta.rosetta.basic.datacache.ConstDataMap) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.ConstDataMap, rhs: pyrosetta.rosetta.basic.datacache.ConstDataMap) → pyrosetta.rosetta.basic.datacache.ConstDataMap

Performs a shallow copy of all of the pointers stored in rhs into this.

C++: basic::datacache::ConstDataMap::operator=(const class basic::datacache::ConstDataMap &) –> class basic::datacache::ConstDataMap &

has(*args, **kwargs)

Overloaded function.

  1. has(self: pyrosetta.rosetta.basic.datacache.ConstDataMap, category: str) -> bool

are there any objects in the outer map with the given category?

C++: basic::datacache::ConstDataMap::has(const class std::basic_string<char> &) const –> bool

  1. has(self: pyrosetta.rosetta.basic.datacache.ConstDataMap, category: str, name: str) -> bool

Is there an object with the given category and the given name?

C++: basic::datacache::ConstDataMap::has(const class std::basic_string<char> &, const class std::basic_string<char> &) const –> bool

size(self: pyrosetta.rosetta.basic.datacache.ConstDataMap) → int

returns the number of objects contained in the map

C++: basic::datacache::ConstDataMap::size() const –> unsigned long

class pyrosetta.rosetta.basic.datacache.DataMap

Bases: pybind11_builtins.pybind11_object

general-purpose store for any reference-count derived object

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(self: pyrosetta.rosetta.basic.datacache.DataMap) → None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.DataMap, : pyrosetta.rosetta.basic.datacache.DataMap) → pyrosetta.rosetta.basic.datacache.DataMap

C++: basic::datacache::DataMap::operator=(const class basic::datacache::DataMap &) –> class basic::datacache::DataMap &

has(*args, **kwargs)

Overloaded function.

  1. has(self: pyrosetta.rosetta.basic.datacache.DataMap, type: str) -> bool
  2. has(self: pyrosetta.rosetta.basic.datacache.DataMap, type: str, name: str) -> bool

Does the data map contain an entry with a specific name in the given type?

calling this function without providing a name is just plain wrong and makes no sense and I would be changing that right now if Kale hadn’t already found out that some code relies on this bad behavior back in pull request #187

C++: basic::datacache::DataMap::has(const class std::basic_string<char> &, const class std::basic_string<char> &) const –> bool

has_type(self: pyrosetta.rosetta.basic.datacache.DataMap, type: str) → bool

Does the data map contain the given type?

C++: basic::datacache::DataMap::has_type(const class std::basic_string<char> &) const –> bool

size(self: pyrosetta.rosetta.basic.datacache.DataMap) → int

returns the size of the map (how many different types are in data_map_

C++: basic::datacache::DataMap::size() const –> unsigned long

class pyrosetta.rosetta.basic.datacache.DiagnosticData

Bases: pyrosetta.rosetta.basic.datacache.CacheableData

Wrapper for std::map<string, Real>

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.DiagnosticData, data_in: pyrosetta.rosetta.std.map_std_string_double) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.DiagnosticData, arg0: pyrosetta.rosetta.basic.datacache.DiagnosticData) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.DiagnosticData, : pyrosetta.rosetta.basic.datacache.DiagnosticData) → pyrosetta.rosetta.basic.datacache.DiagnosticData

C++: basic::datacache::DiagnosticData::operator=(const class basic::datacache::DiagnosticData &) –> class basic::datacache::DiagnosticData &

clone(self: pyrosetta.rosetta.basic.datacache.DiagnosticData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::DiagnosticData::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

data(self: pyrosetta.rosetta.basic.datacache.DiagnosticData) → pyrosetta.rosetta.std.map_std_string_double

C++: basic::datacache::DiagnosticData::data() const –> const class std::map<std::string, double, struct std::less<std::string >, class std::allocator<struct std::pair<const std::string, double> > > &

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

shared_from_this(self: pyrosetta.rosetta.basic.datacache.DiagnosticData) → pyrosetta.rosetta.basic.datacache.DiagnosticData

C++: basic::datacache::DiagnosticData::shared_from_this() –> class std::shared_ptr<class basic::datacache::DiagnosticData>

class pyrosetta.rosetta.basic.datacache.HierarchicalDataMap

Bases: pybind11_builtins.pybind11_object

A data map designed to help create hierarchies with complicated shared data requirements.

To explain what exactly this class is supposed to do, consider the following mover hierarchy (which comes from the loop modeling framework and was the actual motivation for this code):

A ~ | ~

+——-+——+——+——+ ~ | | | | | ~ B C D E F ~

/ / / ~
G H I J K L ~
| / /| ~

M N O P Q R ~

To explain this diagram a little, each letter corresponds to a mover. The movers are mostly of different classes, although they all inherit from the same abstract base class. This whole hierarchy is constructed by A. When A.apply() is called, it calls B.apply(), C.apply(), D.apply(), E.apply(), and F.apply() in that order. When B.apply() is called, it calls G.apply() and H.apply(), and so on. If you are interested in seeing exactly how this hierarchy is implemented, here are the classes the letters correspond to:

  1. protocols::loop_modeling::LoopModeler
  2. protocols::loop_modeling::utilities::PrepareForCentroid
  3. protocols::loop_modeling::LoopBuilder
  4. protocols::loop_modeling::LoopProtocol
  5. protocols::loop_modeling::utilities::PrepareForFullatom
  6. protocols::loop_modeling::LoopProtocol
  7. protocols::kinematic_closure::KicMover
  8. protocols::loop_modeling::refiners::MinimizationRefiner
  9. protocols::loop_modeling::utilities::LoopMoverGroup
  10. protocols::loop_modeling::utilities::LoopMoverGroup
  11. protocols::loop_modeling::utilities::LoopMoverGroup
  12. protocols::loop_modeling::utilities::LoopMoverGroup
  13. protocols::kinematic_closure::KicMover
  14. protocols::loop_modeling::refiners::MinimizationRefiner
  15. protocols::kinematic_closure::KicMover
  16. protocols::loop_modeling::refiners::RepackingRefiner
  17. protocols::loop_modeling::refiners::RotamerTrialsRefiner
  18. protocols::loop_modeling::refiners::MinimizationRefiner

This hierarchy had the following shared data requirements:

  1. Everything in the hierarchy has to share a loops object.
  2. A has to know about centroid and fullatom score functions.
  3. B, D, and all their children have to use the centroid score function.
  4. F and all its children have to use the fullatom score function.
  5. A has to provide a default task factory to all its children.
  6. Only P and Q have any use for a task factory, and they may want to override the default provided by A.

Many of these requirements have a similar form: movers higher in the hierarchy must be able to provide default attributes to all their children, and movers lower in the hierarchy must be able to override those defaults. This class supports that pattern by being a data map that asks its parent for missing values.

More specifically, this class stores two pieces of information: a DataMap and a pointer to a parent HierarchicalDataMap. The DataMap provides the basic attribute lookup capability: it’s just a string to owning pointer map. The parent pointer allows the HierarchicalDataMap to recursively access default values from parent maps for key that aren’t in it’s own DataMap.

Going back to the example hierarchy above: A needs to provide a default task factory that P and Q can override. To accomplish this, we start by giving all the objects in the hierarchy HierarchicalDataMap objects that have been properly connected to their parents. Then A sets the default “task_ops” attribute in it’s own HierarchicalDataMap as soon as it’s constructed. P and Q provide convenience methods like get_task_ops() and set_task_ops() to allow the “task_ops” field of their HierarchicalDataMaps to be accessed publicly. Since the data maps in P and Q are connected to A via L and F, the attributes stored in A will serve as defaults for P and Q.

It’s worth noting that in this example, it is also possible to get the right behavior by putting a task operations data member in the shared base class. However, this is a poor solution for two reasons. The first is that it requires many classes that have no need for task operations to have a task operations attribute. Second, it requires that you write the default logic for each attribute that needs it, which is a duplication of effort. Using HierarchicalDataMap addresses both of these problems.

When using this class to help build a hierarchy like the one illustrated above, you might find it useful to move public accessor methods (like get_task_ops() and set_task_ops() in P and Q) into a reusable mixin class. This takes a little bit of C++ template magic, because you have to use the “curiously recurring template pattern” (CRTP). But you can see how this works by looking at protocols::loop_modeling::RepackingLoopMover (P in the example) and protocols::loop_modeling::utilites::TaskFactoryMixin (the mixin class).

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(self: pyrosetta.rosetta.basic.datacache.HierarchicalDataMap) → None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.HierarchicalDataMap, : pyrosetta.rosetta.basic.datacache.HierarchicalDataMap) → pyrosetta.rosetta.basic.datacache.HierarchicalDataMap

C++: basic::datacache::HierarchicalDataMap::operator=(const class basic::datacache::HierarchicalDataMap &) –> class basic::datacache::HierarchicalDataMap &

set_parent(self: pyrosetta.rosetta.basic.datacache.HierarchicalDataMap, parent: pyrosetta.rosetta.std.weak_ptr_const_basic_datacache_HierarchicalDataMap_t) → None

Set a parent for this data map.

If a key is requested and not found in this data map, the search will continue (recursively) in the parent. Having a parent is optional.

C++: basic::datacache::HierarchicalDataMap::set_parent(class std::weak_ptr<const class basic::datacache::HierarchicalDataMap>) –> void

unset_parent(self: pyrosetta.rosetta.basic.datacache.HierarchicalDataMap) → None

Unset the parent for this data map.

When a data map doesn’t have a parent, it will only return keys it is holding itself. Having a parent is optional.

C++: basic::datacache::HierarchicalDataMap::unset_parent() –> void

class pyrosetta.rosetta.basic.datacache.WriteableCacheableData

Bases: pyrosetta.rosetta.basic.datacache.CacheableData

base class for data storable within a DataCache

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableData, arg0: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableData, : pyrosetta.rosetta.basic.datacache.WriteableCacheableData) → pyrosetta.rosetta.basic.datacache.WriteableCacheableData

C++: basic::datacache::WriteableCacheableData::operator=(const class basic::datacache::WriteableCacheableData &) –> class basic::datacache::WriteableCacheableData &

clone(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

datatype(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) → str

C++: basic::datacache::WriteableCacheableData::datatype() const –> std::string

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

shared_from_this(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) → pyrosetta.rosetta.basic.datacache.WriteableCacheableData

C++: basic::datacache::WriteableCacheableData::shared_from_this() –> class std::shared_ptr<class basic::datacache::WriteableCacheableData>

write(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableData, out: pyrosetta.rosetta.std.ostream) → None

C++: basic::datacache::WriteableCacheableData::write(class std::basic_ostream<char> &) const –> void

class pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator

Bases: pybind11_builtins.pybind11_object

Abstract base class for a Mover factory; the Creator class is responsible for creating a particular mover class.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator, arg0: pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator, : pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator) → pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator

C++: basic::datacache::WriteableCacheableDataCreator::operator=(const class basic::datacache::WriteableCacheableDataCreator &) –> class basic::datacache::WriteableCacheableDataCreator &

create_data(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator, in: pyrosetta.rosetta.std.istream) → pyrosetta.rosetta.basic.datacache.WriteableCacheableData

C++: basic::datacache::WriteableCacheableDataCreator::create_data(class std::basic_istream<char> &) const –> class std::shared_ptr<class basic::datacache::WriteableCacheableData>

keyname(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableDataCreator) → str

C++: basic::datacache::WriteableCacheableDataCreator::keyname() const –> std::string

class pyrosetta.rosetta.basic.datacache.WriteableCacheableMap

Bases: pyrosetta.rosetta.basic.datacache.CacheableData

Wrapper for a map< string, string >.

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap) -> None
  2. __init__(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap, arg0: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap) -> None
__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

assign(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap, : pyrosetta.rosetta.basic.datacache.WriteableCacheableMap) → pyrosetta.rosetta.basic.datacache.WriteableCacheableMap

C++: basic::datacache::WriteableCacheableMap::operator=(const class basic::datacache::WriteableCacheableMap &) –> class basic::datacache::WriteableCacheableMap &

clone(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::WriteableCacheableMap::clone() const –> class std::shared_ptr<class basic::datacache::CacheableData>

erase(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap, d: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) → None

C++: basic::datacache::WriteableCacheableMap::erase(class std::shared_ptr<class basic::datacache::WriteableCacheableData>) –> void

get_self_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.basic.datacache.CacheableData

C++: basic::datacache::CacheableData::get_self_ptr() –> class std::shared_ptr<class basic::datacache::CacheableData>

get_self_weak_ptr(self: pyrosetta.rosetta.basic.datacache.CacheableData) → pyrosetta.rosetta.std.weak_ptr_basic_datacache_CacheableData_t

C++: basic::datacache::CacheableData::get_self_weak_ptr() –> class std::weak_ptr<class basic::datacache::CacheableData>

has(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap, data: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) → bool

C++: basic::datacache::WriteableCacheableMap::has(class std::shared_ptr<class basic::datacache::WriteableCacheableData>) –> bool

insert(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap, data: pyrosetta.rosetta.basic.datacache.WriteableCacheableData) → None

C++: basic::datacache::WriteableCacheableMap::insert(class std::shared_ptr<class basic::datacache::WriteableCacheableData>) –> void

shared_from_this(self: pyrosetta.rosetta.basic.datacache.WriteableCacheableMap) → pyrosetta.rosetta.basic.datacache.WriteableCacheableMap

C++: basic::datacache::WriteableCacheableMap::shared_from_this() –> class std::shared_ptr<class basic::datacache::WriteableCacheableMap>