Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
core::pack::palette::PackerPaletteFactory Class Reference

#include <PackerPaletteFactory.hh>

Inheritance diagram for core::pack::palette::PackerPaletteFactory:
Inheritance graph
[legend]

Public Types

typedef utility::vector1
< PackerPaletteOP
PackerPaletteOPs
 
typedef std::map< std::string,
PackerPaletteCreatorOP
PackerPaletteCreatorMap
 
typedef utility::tag::Tag Tag
 
typedef utility::tag::TagOP TagOP
 
typedef utility::tag::TagCOP TagCOP
 

Public Member Functions

void factory_register (PackerPaletteCreatorOP)
 
void add_creator (PackerPaletteCreatorOP)
 add a prototype, using its default type name as the map key More...
 
bool has_type (std::string const &) const
 Does a type exist? More...
 
PackerPaletteOP newPackerPalette (std::string const &, basic::datacache::DataMap &datamap, TagCOP=TagCOP(TagOP(new Tag()))) const
 Return new PackerPalette by key lookup in packer_palette_creator_map_. More...
 
void newPackerPalettes (PackerPaletteOPs &, basic::datacache::DataMap &datamap, TagCOP) const
 Fills packer_palette_creator_map_ vector with new PackerPalettes from nested "PACKER_PALETTES" TagCOP. More...
 
void newPackerPalettes (PackerPaletteOPs &, basic::datacache::DataMap &datamap, std::string const &) const
 Fills packer_palette_creator_map_ vector with new PackerPalettes from xml-like tag file. More...
 
void define_packer_palette_xml_schema (utility::tag::XMLSchemaDefinition &xsd) const
 The PackerPaletteFactory is the point of entry for the definition of the XML Schemas for every PackerPalette that may be instantiated from an XML file. It is responsible for defining an xs:group named "packer_palette" listing each of the packer-palette-complex types that may be initialized using the PackerPaletteFactory. It will iterate across each of the PackerPaletteCreators that it contains, asking them for the XML schema of the PackerPalette that each one is responsible for creating. More...
 
std::string get_citation_humanreadable (std::string const &palette_name) const
 Get a human-readable listing of the citations for a given packer palette, by packer palette name. More...
 
void provide_xml_schema (std::string const &packer_palette_name, utility::tag::XMLSchemaDefinition &xsd) const
 Get the XML schema for a given packer palette. More...
 
PackerPaletteOP create_packer_palette_from_global_defaults () const
 Create a packer palette based on global defaults, and return an owning pointer to it. More...
 

Static Public Member Functions

static std::string packer_palette_xml_schema_group_name ()
 

Private Member Functions

 PackerPaletteFactory ()
 Private constructor. More...
 
virtual ~PackerPaletteFactory ()
 Private destructor. More...
 

Static Private Member Functions

static PackerPaletteOP initialize_packer_palette_from_global_defaults ()
 Create the PackerPalette that we clone whenever create_packer_palette_from_global_defaults() is called. More...
 

Private Attributes

PackerPaletteCreatorMap packer_palette_creator_map_
 Map of string->PackerPaletteOP. More...
 
PackerPaletteOP default_palette_
 The default PackerPalette, handed out by create_packer_palette_from_global_defaults(). More...
 

Friends

class utility::SingletonBase< PackerPaletteFactory >
 

Member Typedef Documentation

Constructor & Destructor Documentation

core::pack::palette::PackerPaletteFactory::PackerPaletteFactory ( )
private

Private constructor.

the default PackerPalettes are now initialized in core/init/init.cc via the registrator/creator scheme

core::pack::palette::PackerPaletteFactory::~PackerPaletteFactory ( )
privatevirtual

Private destructor.

Member Function Documentation

void core::pack::palette::PackerPaletteFactory::add_creator ( PackerPaletteCreatorOP  creator)

add a prototype, using its default type name as the map key

add a PackerPalette prototype creator

References packer_palette_creator_map_.

Referenced by factory_register().

PackerPaletteOP core::pack::palette::PackerPaletteFactory::create_packer_palette_from_global_defaults ( ) const

Create a packer palette based on global defaults, and return an owning pointer to it.

By default, makes a DefaultPackePalette. If the user provides options for additional residues, makes a CustomBaseTypePackerPalette.

By default, makes a DefaultPackerPalette. (If the user provides -packer_palette:NCAA_expanded, or equivalent local options, makes a NCAADefaultPackerPalette.) If the user provides options for additional residues, makes a CustomBaseTypePackerPalette.

References default_palette_, and initialize_packer_palette_from_global_defaults().

void core::pack::palette::PackerPaletteFactory::define_packer_palette_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd) const

The PackerPaletteFactory is the point of entry for the definition of the XML Schemas for every PackerPalette that may be instantiated from an XML file. It is responsible for defining an xs:group named "packer_palette" listing each of the packer-palette-complex types that may be initialized using the PackerPaletteFactory. It will iterate across each of the PackerPaletteCreators that it contains, asking them for the XML schema of the PackerPalette that each one is responsible for creating.

By convention, the name assigned to each of the complexTypes for PackerPalettes should be what is returned by the function "complex_type_name_for_packer_palette" (declared in core/pack/palette/xsd_util.hh) when given the argument returned by that PackerPalette's PackerPaletteCreator's keyname() function. So long as the writing of XML schema for your packer palette is accomplished by calling the functions in core/pack/palette/xsd_util.hh, then this should happen automatically.

References core::pack::palette::complex_type_name_for_packer_palette(), packer_palette_creator_map_, and packer_palette_xml_schema_group_name().

void core::pack::palette::PackerPaletteFactory::factory_register ( PackerPaletteCreatorOP  creator)
std::string core::pack::palette::PackerPaletteFactory::get_citation_humanreadable ( std::string const &  palette_name) const

Get a human-readable listing of the citations for a given packer palette, by packer palette name.

Get a human-readable listing of the citations for a given filter, by filter name.

Returns an empty string if there are no citations.

Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).

References packer_palette_creator_map_.

Referenced by protocols::rosetta_scripts::print_information().

bool core::pack::palette::PackerPaletteFactory::has_type ( std::string const &  type) const
PackerPaletteOP core::pack::palette::PackerPaletteFactory::initialize_packer_palette_from_global_defaults ( )
staticprivate

Create the PackerPalette that we clone whenever create_packer_palette_from_global_defaults() is called.

This function is intended ONLY to be called in a threadsafe manner from create_packer_palette_from_global_defaults().

Note
This function reads from the global options system, and can read from disk.

References protocols::abinitio::filename().

Referenced by create_packer_palette_from_global_defaults().

PackerPaletteOP core::pack::palette::PackerPaletteFactory::newPackerPalette ( std::string const &  type,
basic::datacache::DataMap &  datamap,
TagCOP  tag = TagCOPTagOP( new Tag() ) ) 
) const

Return new PackerPalette by key lookup in packer_palette_creator_map_.

New PackerPalette parses Tag if provided)

References packer_palette_creator_map_, and core::pack::palette::TR().

Referenced by newPackerPalettes().

void core::pack::palette::PackerPaletteFactory::newPackerPalettes ( PackerPaletteOPs ppops,
basic::datacache::DataMap &  datamap,
TagCOP  tag 
) const

Fills packer_palette_creator_map_ vector with new PackerPalettes from nested "PACKER_PALETTES" TagCOP.

recurse tag file to find PACKER_PALETTES definitions

References newPackerPalette(), and core::pack::palette::TR().

Referenced by newPackerPalettes().

void core::pack::palette::PackerPaletteFactory::newPackerPalettes ( PackerPaletteOPs ppops,
basic::datacache::DataMap &  datamap,
std::string const &  tagfilename 
) const

Fills packer_palette_creator_map_ vector with new PackerPalettes from xml-like tag file.

References newPackerPalettes(), and core::pack::palette::TR().

std::string core::pack::palette::PackerPaletteFactory::packer_palette_xml_schema_group_name ( )
static
void core::pack::palette::PackerPaletteFactory::provide_xml_schema ( std::string const &  packer_palette_name,
utility::tag::XMLSchemaDefinition &  xsd 
) const

Get the XML schema for a given packer palette.

Throws an error if the packer palette is unknown to Rosetta.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References has_type(), and packer_palette_creator_map_.

Referenced by protocols::rosetta_scripts::print_information().

Friends And Related Function Documentation

friend class utility::SingletonBase< PackerPaletteFactory >
friend

Member Data Documentation

PackerPaletteOP core::pack::palette::PackerPaletteFactory::default_palette_
mutableprivate
PackerPaletteCreatorMap core::pack::palette::PackerPaletteFactory::packer_palette_creator_map_
private

The documentation for this class was generated from the following files: