xsd_util¶
Bindings for utility::xsd_util namespace
-
class
pyrosetta.rosetta.utility.xsd_util.
RosettaModuleOptionType
¶ Bases:
pybind11_builtins.pybind11_object
Enum for the types of options (boolean, task operation, string, integer, etc.) that a Rosetta module might have.
This is provided for the convenience of user interface code that will want to know whether a particular option is a boolean, an integer, etc. It should NOT be confused with the enums in XMLSchemaGeneration.hh and XMLSchemaGeneration.fwd.hh, which are a more comprehensive and detailed list of the possible types of data.
Vikram K. Mulligan (vmullig.edu).
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__eq__
(*args, **kwargs)¶ Overloaded function.
- __eq__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType, arg0: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType) -> bool
- __eq__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType, arg0: int) -> bool
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getstate__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType) → tuple¶
-
__gt__
¶ Return self>value.
-
__hash__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType) → int¶
-
__init__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType, arg0: int) → None¶
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__int__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType) → int¶
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__ne__
(*args, **kwargs)¶ Overloaded function.
- __ne__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType, arg0: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType) -> bool
- __ne__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType, arg0: int) -> bool
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType) → str¶
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType, arg0: tuple) → None¶
-
__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).
-
-
class
pyrosetta.rosetta.utility.xsd_util.
RosettaModuleType
¶ Bases:
pybind11_builtins.pybind11_object
Enum for the types of Rosetta modules covered by the XSD that a UI would want to be able to provide an interface for.
If you add to this list, update the get_module_type_as_it_appears_in_xsd() function and the get_specific_module_name_as_it_appears_in_xsd() function.
Vikram K. Mulligan (vmullig.edu).
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__eq__
(*args, **kwargs)¶ Overloaded function.
- __eq__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType, arg0: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) -> bool
- __eq__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType, arg0: int) -> bool
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__getstate__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) → tuple¶
-
__gt__
¶ Return self>value.
-
__hash__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) → int¶
-
__init__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType, arg0: int) → None¶
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__int__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) → int¶
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__ne__
(*args, **kwargs)¶ Overloaded function.
- __ne__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType, arg0: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) -> bool
- __ne__(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType, arg0: int) -> bool
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) → str¶
-
__setattr__
¶ Implement setattr(self, name, value).
-
__setstate__
(self: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType, arg0: tuple) → None¶
-
__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).
-
-
pyrosetta.rosetta.utility.xsd_util.
generate_human_readable_documentation
(doc_node: pyrosetta.rosetta._xmlNode, outstream: pyrosetta.rosetta.std.stringstream) → None¶ Given a documentation node in an XML tree, parse out the documentation and print it.
Vikram K. Mulligan (vmullig.edu)C++: utility::xsd_util::generate_human_readable_documentation(struct _xmlNode *, class std::basic_stringstream<char> &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
generate_human_readable_recursive
(rootnode: pyrosetta.rosetta._xmlNode, description: pyrosetta.rosetta.std.stringstream, tags: pyrosetta.rosetta.std.stringstream, options: pyrosetta.rosetta.std.stringstream, level: int, complextype: str, tag_name_to_print: str) → None¶ Go through an XSD XML and generate a human-readable version, recursively.
Vikram K. Mulligan (vmullig.edu)C++: utility::xsd_util::generate_human_readable_recursive(struct _xmlNode *, class std::basic_stringstream<char> &, class std::basic_stringstream<char> &, class std::basic_stringstream<char> &, const unsigned long, const class std::basic_string<char> &, const class std::basic_string<char> &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
generate_human_readable_summary
(xsd: str, component_name: str, component_type: str) → str¶ Go through an XSD and generate a human-readable description of a particular Rosetta module.
Calls generate_human_readable_recursive.
If component_name and component_type are provided, then summary information is only returned for that particular object type. For example, component_name=”DeclareBond” and component_type=”mover” would return information on the DeclareBond mover. Also note, this function uses raw pointers, unfortunately – the libxml2 functions that I’m calling require it. As such, no premature return statements should be added prior to the xmlFreeDoc and xmlCleanupParser statements at the end of the function.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::generate_human_readable_summary(const class std::basic_string<char> &, const class std::basic_string<char> &, const class std::basic_string<char> &) –> std::string
-
pyrosetta.rosetta.utility.xsd_util.
generate_tag_given_options
(stringstream_out: pyrosetta.rosetta.std.stringstream, tag_name: str, option_list: pyrosetta.rosetta.utility.vector1_std_pair_std_string_std_string_t, terminal_slash: bool, triangular_brackets: bool) → None¶ - Given the name of a tag (tag_name) and a list of options (as pairs of option name, option value), generate
the tag.
If terminal_slash is true, a slash is added at the end of the tag. If triangular_brackets is true, everything is enclosed in triangular brackets.
C++: utility::xsd_util::generate_tag_given_options(class std::basic_stringstream<char> &, const class std::basic_string<char> &, const class utility::vector1<struct std::pair<class std::basic_string<char>, class std::basic_string<char> >, class std::allocator<struct std::pair<class std::basic_string<char>, class std::basic_string<char> > > > &, const bool, const bool) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_choice_min_and_max
(choice_node: pyrosetta.rosetta._xmlNode, choice_min: int, choice_max: int) → None¶ Given a “xs:choice” element in an XSD, get the minOccurs and maxOccurs options and store them in unsigned integers.
Stores 0 for “unbounded” or for anything that can’t be interpreted as a nonnegative integer.
A pointer ot an xmlNode representing an <xs:choice … /> tag.
The value parsed from minOccurs.
The value parsed from maxOccurs.
C++: utility::xsd_util::get_choice_min_and_max(struct _xmlNode *, unsigned long &, unsigned long &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_filter_names_from_xsd
(xsd: str, filter_names_out: pyrosetta.rosetta.utility.vector1_std_string) → None¶ Given an xsd for RosettaScripts, get all of the names of filter elements.
The filter_names_out vector is cleared and repopulated by this operation.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_filter_names_from_xsd(const class std::basic_string<char> &, class utility::vector1<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_module_names_from_xsd
(xsd: str, module_name: str, names_out: pyrosetta.rosetta.utility.vector1_std_string) → None¶ Given an xsd for RosettaScripts, get all of the names of a particular type of Rosetta module.
The names_out vector is cleared and repopulated by this operation.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_module_names_from_xsd(const class std::basic_string<char> &, const class std::basic_string<char> &, class utility::vector1<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_module_type_as_it_appears_in_xsd
(module_type: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) → str¶ Given a type of module (mover, filter, etc.), get its name as it appears in the RosettaScripts xsd (e.g. “mover”, “filter”, etc.).
Vikram K. Mulligan (vmullig.edu).C++: utility::xsd_util::get_module_type_as_it_appears_in_xsd(const enum utility::xsd_util::RosettaModuleType) –> std::string
-
pyrosetta.rosetta.utility.xsd_util.
get_mover_names_from_xsd
(xsd: str, mover_names_out: pyrosetta.rosetta.utility.vector1_std_string) → None¶ Given an xsd for RosettaScripts, get all of the names of mover elements.
The mover_names_out vector is cleared and repopulated by this operation.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_mover_names_from_xsd(const class std::basic_string<char> &, class utility::vector1<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_node_option
(node: pyrosetta.rosetta._xmlNode, optionname: str) → str¶ Given a node in an XML tree, get the value of an option.
Vikram K. Mulligan (vmullig.edu)C++: utility::xsd_util::get_node_option(struct _xmlNode *, const class std::basic_string<char> &) –> std::string
-
pyrosetta.rosetta.utility.xsd_util.
get_option_type_from_name
(name: str, type: str) → pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType¶ Given an option type that appears in the xsd (e.g. “xs:string”, “rosetta_bool”, etc.), convert it to an enum.
Note that for certain string types, this function looks at the specific name to determine whether this is a task operation/residue selector list.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_option_type_from_name(const class std::basic_string<char> &, const class std::basic_string<char> &) –> enum utility::xsd_util::RosettaModuleOptionType
-
pyrosetta.rosetta.utility.xsd_util.
get_residue_level_task_operation_names_from_xsd
(xsd: str, rltaskop_names_out: pyrosetta.rosetta.utility.vector1_std_string) → None¶ Given an xsd for RosettaScripts, get all of the names of residue-level task operation elements.
The rltaskop_names_out vector is cleared and repopulated by this operation.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_residue_level_task_operation_names_from_xsd(const class std::basic_string<char> &, class utility::vector1<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_residue_selector_names_from_xsd
(xsd: str, residue_selector_names_out: pyrosetta.rosetta.utility.vector1_std_string) → None¶ Given an xsd for RosettaScripts, get all of the names of residue selector elements.
The residue_selector_names_out vector is cleared and repopulated by this operation.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_residue_selector_names_from_xsd(const class std::basic_string<char> &, class utility::vector1<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_specific_module_name_as_it_appears_in_xsd
(module_name: str, module_type: pyrosetta.rosetta.utility.xsd_util.RosettaModuleType) → str¶ - Given a name of a specific module (e.g. “FastDesign”) of a particular type (e.g. mover), return the name
as it appears in the XSD (e.g. “mover_FastDesign_type”).
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_specific_module_name_as_it_appears_in_xsd(const class std::basic_string<char> &, const enum utility::xsd_util::RosettaModuleType) –> std::string
-
pyrosetta.rosetta.utility.xsd_util.
get_tag_name
(node: pyrosetta.rosetta._xmlNode) → str¶ Given a node in an XML tree representing a tag, get the string that starts the tag. (e.g. “DeclareBond” in “<DeclareBond …. />”).
Vikram K. Mulligan (vmullig.edu)C++: utility::xsd_util::get_tag_name(struct _xmlNode *) –> std::string
-
pyrosetta.rosetta.utility.xsd_util.
get_task_operation_names_from_xsd
(xsd: str, taskop_names_out: pyrosetta.rosetta.utility.vector1_std_string) → None¶ Given an xsd for RosettaScripts, get all of the names of task operation elements.
The taskop_names_out vector is cleared and repopulated by this operation.
Vikram K. Mulligan (vmullig.edu).
C++: utility::xsd_util::get_task_operation_names_from_xsd(const class std::basic_string<char> &, class utility::vector1<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &) –> void
-
pyrosetta.rosetta.utility.xsd_util.
get_type_name
(xsd_type: str) → str¶ Given an XSD simple type (e.g. “rosetta_bool”), return a more human-readable type (e.g. “bool”).
Vikram K. Mulligan (vmullig.edu)C++: utility::xsd_util::get_type_name(const class std::basic_string<char> &) –> std::string
-
pyrosetta.rosetta.utility.xsd_util.
output_all_tag_options
(node: pyrosetta.rosetta._xmlNode, tagname: str, level: int, tags: pyrosetta.rosetta.std.stringstream, options: pyrosetta.rosetta.std.stringstream) → None¶ - Given a node in an XML tree representing a tag, get all options in that tag, write their descriptions to “options”,
and write their names and types to “tags”.
Heads the section in “options” with the tag name.
Vikram K. Mulligan (vmullig.edu)
C++: utility::xsd_util::output_all_tag_options(struct _xmlNode *, const class std::basic_string<char> &, const unsigned long, class std::basic_stringstream<char> &, class std::basic_stringstream<char> &) –> void