Rosetta 3.4
Public Types | Public Member Functions
core::chemical::ResidueTypeSet Class Reference

A collection of ResidueType defined. More...

#include <ResidueTypeSet.hh>

Inheritance diagram for core::chemical::ResidueTypeSet:
Inheritance graph
[legend]
Collaboration diagram for core::chemical::ResidueTypeSet:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list< AA >
::const_iterator 
AAsIter
typedef std::map< std::string,
ResidueTypeCAP >
::const_iterator 
const_residue_iterator

Public Member Functions

 ResidueTypeSet ()
 default c-tor
 ResidueTypeSet (std::string const &name, std::string const &directory, std::vector< std::string > const &extra_res_param_files=std::vector< std::string >())
 constructor from directory
virtual ~ResidueTypeSet ()
std::string const & name () const
 name of the residue type set
void read_list_of_residues (std::string const &list_filename, AtomTypeSetCAP atom_types, ElementSetCAP elements, MMAtomTypeSetCAP mm_atom_types, orbitals::OrbitalTypeSetCAP orbital_types)
 read a list of residue types
void read_files (utility::vector1< std::string > const &filenames, AtomTypeSetCAP atom_types, ElementSetCAP elements, MMAtomTypeSetCAP mm_atom_types, orbitals::OrbitalTypeSetCAP orbital_types)
void apply_patches (std::string const &filename)
 apply patches to base ResidueType to generate variant ResidueTyes
void apply_patches (utility::vector1< std::string > const &filenames)
void place_adducts ()
 apply patches to base ResidueType to generate variant ResidueTyes
void add_residue_type (ResidueTypeOP new_type)
 adds a new residue type to the set
void create_adduct_combinations (ResidueType const &rsd, std::map< std::string, int > ref_map, std::map< std::string, int > count_map, utility::vector1< bool > add_mask, utility::vector1< Adduct >::const_iterator work_iter)
 Create correct combinations of adducts for a residue type.
ResidueTypeCAPs const & name3_map (std::string const &name) const
 query ResidueTypes by their 3-letter name
ResidueType const & name_map (std::string const &name) const
 query ResidueType by its unique residue id.
ResidueTypenonconst_name_map (std::string const &name)
 query ResidueType by its unique residue id.
bool has_name (std::string const &name) const
 query if a ResidueType of the unique residue id is present.
bool has_name3 (std::string const &name3) const
 query if a ResidueType of a certain 3letter name is present.
ResidueType const & get_residue_type_with_variant_added (ResidueType const &init_rsd, VariantType const &new_type) const
 query a variant ResidueType by its base ResidueType and VariantType
ResidueType const & get_residue_type_with_variant_removed (ResidueType const &init_rsd, VariantType const &old_type) const
 return the residuetype we get from variant rsd type after removing the desired variant type
ResidueTypeCAPs const & aa_map (AA const &aa) const
 query ResidueTypes by their AA enum type
void select_residues (ResidueSelector const &selector, ResidueTypeCAPs &matches) const
 select a set of ResidueTypes give certain criteria
std::list< AA >::const_iterator aas_defined_begin () const
 beginning of aas_defined_ list
std::list< AA >::const_iterator aas_defined_end () const
 end of aas_defined_ list
const_residue_iterator all_residues_begin () const
const_residue_iterator all_residues_end () const
ResidueTypeCAPs const & residue_types () const
 alternate access to all residuetypes as vector
std::string const & database_directory () const
 accessor for database_directory

Detailed Description

A collection of ResidueType defined.

One thing that is not nailed down is whether a single ResidueSet can have ResidueType's with different AtomTypeSets. I've left open this possibility currently although there isnt any code for this yet (PB-07/07)


Member Typedef Documentation

typedef std::list< AA >::const_iterator core::chemical::ResidueTypeSet::AAsIter
typedef std::map< std::string, ResidueTypeCAP >::const_iterator core::chemical::ResidueTypeSet::const_residue_iterator

Constructor & Destructor Documentation

core::chemical::ResidueTypeSet::ResidueTypeSet ( )

default c-tor

core::chemical::ResidueTypeSet::ResidueTypeSet ( std::string const &  name,
std::string const &  directory,
std::vector< std::string > const &  extra_res_param_files = std::vector< std::string >() 
)
core::chemical::ResidueTypeSet::~ResidueTypeSet ( ) [virtual]

Member Function Documentation

ResidueTypeCAPs const& core::chemical::ResidueTypeSet::aa_map ( AA const &  aa) const [inline]

query ResidueTypes by their AA enum type

similar to name3_map, return all matched residue types or an empty list.

Referenced by core::coarse::CoarseEtable::dump_oldstyle_type_table(), core::fragment::make_pose_from_sequence_(), and core::pose::residue_types_from_sequence().

std::list< AA >::const_iterator core::chemical::ResidueTypeSet::aas_defined_begin ( ) const

beginning of aas_defined_ list

std::list< AA >::const_iterator core::chemical::ResidueTypeSet::aas_defined_end ( ) const

end of aas_defined_ list

void core::chemical::ResidueTypeSet::add_residue_type ( ResidueTypeOP  new_type)
const_residue_iterator core::chemical::ResidueTypeSet::all_residues_begin ( ) const [inline]
const_residue_iterator core::chemical::ResidueTypeSet::all_residues_end ( ) const [inline]
void core::chemical::ResidueTypeSet::apply_patches ( utility::vector1< std::string > const &  filenames)
void core::chemical::ResidueTypeSet::apply_patches ( std::string const &  list_filename)

apply patches to base ResidueType to generate variant ResidueTyes

loop through all the existing ResidueTypes and apply patch files given certain selector rules to each of the ResidueTypes to create new variant types. Patches can be applied combinatorially to create more variant types, e.g., a residue with both N-terminus and C-terminus patches.

Referenced by ResidueTypeSet().

void core::chemical::ResidueTypeSet::create_adduct_combinations ( ResidueType const &  rsd,
std::map< std::string, int ref_map,
std::map< std::string, int count_map,
utility::vector1< bool add_mask,
utility::vector1< Adduct >::const_iterator  work_iter 
)

Create correct combinations of adducts for a residue type.

References core::chemical::apply_adducts_to_residue(), and core::chemical::ResidueType::defined_adducts().

Referenced by place_adducts().

std::string const& core::chemical::ResidueTypeSet::database_directory ( ) const [inline]

accessor for database_directory

ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_variant_added ( ResidueType const &  init_rsd,
VariantType const &  new_type 
) const

query a variant ResidueType by its base ResidueType and VariantType

Note:
currently, this will not work for variant types defined as alternate base residues (ie different params files)

return the first match with both base ResidueType id and variant_type name. Abort if there is no match

Note:
currently, this will not work for variant types defined as alternate base residues (ie different params files)

References protocols::vip::base_name(), core::chemical::ResidueType::has_variant_type(), core::chemical::ResidueType::name(), core::chemical::residue_type_base_name(), and core::chemical::ResidueType::variant_types().

ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_variant_removed ( ResidueType const &  init_rsd,
VariantType const &  old_type 
) const

return the residuetype we get from variant rsd type after removing the desired variant type

Note:
currently, this will not work for variant types defined as alternate base residues (ie different params files)

References protocols::vip::base_name(), core::chemical::ResidueType::has_variant_type(), core::chemical::ResidueType::name(), core::chemical::residue_type_base_name(), and core::chemical::ResidueType::variant_types().

bool core::chemical::ResidueTypeSet::has_name ( std::string const &  name) const [inline]
bool core::chemical::ResidueTypeSet::has_name3 ( std::string const &  name3) const [inline]

query if a ResidueType of a certain 3letter name is present.

std::string const& core::chemical::ResidueTypeSet::name ( ) const [inline]
ResidueTypeCAPs const& core::chemical::ResidueTypeSet::name3_map ( std::string const &  name) const [inline]

query ResidueTypes by their 3-letter name

3-letter name is not unique to each ResidueType for example, 3-letter name "HIS" matches both his tautomers, HIS and HIS_D. Return an empty list if no match is found.

Referenced by core::io::pdb::build_pose_as_is1().

ResidueType const& core::chemical::ResidueTypeSet::name_map ( std::string const &  name) const [inline]
ResidueType& core::chemical::ResidueTypeSet::nonconst_name_map ( std::string const &  name) [inline]

query ResidueType by its unique residue id.

since residue id is unique, it only returns one residue type or exit without match.

void core::chemical::ResidueTypeSet::place_adducts ( )

apply patches to base ResidueType to generate variant ResidueTyes

Generation of new residue types augmented by adduct atoms

References create_adduct_combinations(), core::chemical::ResidueType::defined_adducts(), core::chemical::error_check_requested_adducts(), core::chemical::parse_adduct_string(), and residue_types().

Referenced by ResidueTypeSet().

void core::chemical::ResidueTypeSet::read_files ( utility::vector1< std::string > const &  filenames,
AtomTypeSetCAP  atom_types,
ElementSetCAP  elements,
MMAtomTypeSetCAP  mm_atom_types,
orbitals::OrbitalTypeSetCAP  orbital_types 
)
void core::chemical::ResidueTypeSet::read_list_of_residues ( std::string const &  list_filename,
AtomTypeSetCAP  atom_types,
ElementSetCAP  elements,
MMAtomTypeSetCAP  mm_atom_types,
orbitals::OrbitalTypeSetCAP  orbital_types 
)

read a list of residue types

the file contains a list of names of residue type parameter files stored in the database path

References read_files().

ResidueTypeCAPs const& core::chemical::ResidueTypeSet::residue_types ( ) const [inline]
void core::chemical::ResidueTypeSet::select_residues ( ResidueSelector const &  selector,
ResidueTypeCAPs matches 
) const

select a set of ResidueTypes give certain criteria

selection done by ResidueSelector class


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines