xsd_util¶
Bindings for utility::xsd_util namespace
- class pyrosetta.rosetta.utility.xsd_util.RosettaModuleOptionType¶
Bases:
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).
Members:
RMOT_rosetta_bool
RMOT_integer
RMOT_nonnegative_integer
RMOT_real
RMOT_task_operation
RMOT_task_operation_list
RMOT_residue_selector
RMOT_residue_selector_list
RMOT_general_string
RMOT_invalid
RMOT_end_of_list
- RMOT_end_of_list = <RosettaModuleOptionType.RMOT_invalid: 10>¶
- RMOT_general_string = <RosettaModuleOptionType.RMOT_general_string: 9>¶
- RMOT_integer = <RosettaModuleOptionType.RMOT_integer: 2>¶
- RMOT_invalid = <RosettaModuleOptionType.RMOT_invalid: 10>¶
- RMOT_nonnegative_integer = <RosettaModuleOptionType.RMOT_nonnegative_integer: 3>¶
- RMOT_real = <RosettaModuleOptionType.RMOT_real: 4>¶
- RMOT_residue_selector = <RosettaModuleOptionType.RMOT_residue_selector: 7>¶
- RMOT_residue_selector_list = <RosettaModuleOptionType.RMOT_residue_selector_list: 8>¶
- RMOT_rosetta_bool = <RosettaModuleOptionType.RMOT_rosetta_bool: 1>¶
- RMOT_task_operation = <RosettaModuleOptionType.RMOT_task_operation: 5>¶
- RMOT_task_operation_list = <RosettaModuleOptionType.RMOT_task_operation_list: 6>¶
- property name¶
- property value¶
- class pyrosetta.rosetta.utility.xsd_util.RosettaModuleType¶
Bases:
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).
Members:
RMT_mover
RMT_filter
RMT_task_operation
RMT_res_lvl_task_operation
RMT_residue_selector
RMT_sub_element
RMT_invalid
RMT_end_of_list
- RMT_end_of_list = <RosettaModuleType.RMT_invalid: 7>¶
- RMT_filter = <RosettaModuleType.RMT_filter: 2>¶
- RMT_invalid = <RosettaModuleType.RMT_invalid: 7>¶
- RMT_mover = <RosettaModuleType.RMT_mover: 1>¶
- RMT_res_lvl_task_operation = <RosettaModuleType.RMT_res_lvl_task_operation: 4>¶
- RMT_residue_selector = <RosettaModuleType.RMT_residue_selector: 5>¶
- RMT_sub_element = <RosettaModuleType.RMT_sub_element: 6>¶
- RMT_task_operation = <RosettaModuleType.RMT_task_operation: 3>¶
- property name¶
- property value¶
- 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 std::string &, const std::string &) –> 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 std::string &, const std::string &, const std::string &) –> 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 std::string &, const class utility::vector1<struct std::pair<std::string, std::string >, class std::allocator<struct std::pair<std::string, std::string > > > &, 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 std::string &, class utility::vector1<std::string, class std::allocator<std::string > > &) –> 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 std::string &, const std::string &, class utility::vector1<std::string, class std::allocator<std::string > > &) –> 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 std::string &, class utility::vector1<std::string, class std::allocator<std::string > > &) –> 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 std::string &) –> 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 std::string &, const std::string &) –> 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 std::string &, class utility::vector1<std::string, class std::allocator<std::string > > &) –> 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 std::string &, class utility::vector1<std::string, class std::allocator<std::string > > &) –> 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 std::string &, 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 std::string &, class utility::vector1<std::string, class std::allocator<std::string > > &) –> 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 std::string &) –> 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 std::string &, const unsigned long, class std::basic_stringstream<char> &, class std::basic_stringstream<char> &) –> void