Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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]

Public Types

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

Public Member Functions

 ResidueTypeSet ()
 default c-tor More...
 
 ResidueTypeSet (std::string const &name, std::string const &directory, std::vector< std::string > const &extra_res_param_files=std::vector< std::string >(), std::vector< std::string > const &extra_patch_files=std::vector< std::string >())
 constructor from directory More...
 
virtual ~ResidueTypeSet ()
 
std::string const & name () const
 name of the residue type set More...
 
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 More...
 
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 (utility::vector1< std::string > const &filenames)
 
void place_adducts ()
 apply patches to base ResidueType to generate variant ResidueTyes More...
 
void add_residue_type (ResidueTypeOP new_type)
 adds a new residue type to the set More...
 
void remove_residue_type (std::string const &name)
 delete a residue type from the set (Use with care) More...
 
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. More...
 
ResidueTypeCOPs const & name3_map (std::string const &name) const
 query ResidueTypes by their 3-letter name More...
 
ResidueType const & name_map (std::string const &name) const
 query ResidueType by its unique residue id. More...
 
ResidueTypenonconst_name_map (std::string const &name)
 query ResidueType by its unique residue id. More...
 
bool has_name (std::string const &name) const
 query if a ResidueType of the unique residue id is present. More...
 
bool has_name3 (std::string const &name3) const
 query if a ResidueType of a certain 3letter name is present. More...
 
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 More...
 
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 More...
 
ResidueTypeCOPs const & aa_map (AA const &aa) const
 query ResidueTypes by their AA enum type More...
 
void select_residues (ResidueSelector const &selector, ResidueTypeCOPs &matches) const
 select a set of ResidueTypes give certain criteria More...
 
std::list< AA >::const_iterator aas_defined_begin () const
 beginning of aas_defined_ list More...
 
std::list< AA >::const_iterator aas_defined_end () const
 end of aas_defined_ list More...
 
const_residue_iterator all_residues_begin () const
 
const_residue_iterator all_residues_end () const
 
ResidueTypeCOPs const & residue_types () const
 alternate access to all residuetypes as vector More...
 
std::string const & database_directory () const
 accessor for database_directory More...
 

Private Member Functions

void clear_residue_maps ()
 clear residue maps More...
 
void update_residue_maps ()
 update residue maps More...
 
void add_residue_type_to_maps (ResidueTypeOP rsd)
 
void remove_residue_type_from_maps (ResidueTypeOP rsd)
 
 ResidueTypeSet (ResidueTypeSet const &)
 
ResidueTypeSet const & operator= (ResidueTypeSet const &)
 

Private Attributes

std::string name_
 What does the ChemicalManager call this ResidueTypeSet? More...
 
ResidueTypeOPs residue_types_
 the residues More...
 
ResidueTypeCOPs residue_types_const_
 for handing out More...
 
ResidueTypeCOPs empty_residue_list_
 null list of residues when query fails More...
 
std::map< AA, ResidueTypeCOPsaa_map_
 map to ResidueType pointers by AA enum More...
 
std::map< std::string,
ResidueTypeCOPs
name3_map_
 map to ResidueType pointers by 3-letter string name More...
 
std::map< std::string,
ResidueTypeCOP
name_map_
 map to ResidueType pointers by unique residue id More...
 
std::map< std::string,
ResidueTypeOP
nonconst_name_map_
 map to ResidueType pointers by unique residue id, for nonconst access More...
 
std::list< AAaas_defined_
 list of AA types defined More...
 
const std::string database_directory_
 the database directory of the generating files —> allows to use cached dunbrack libs More...
 

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, ResidueTypeCOP >::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 >(),
std::vector< std::string > const &  extra_patch_files = std::vector< std::string >() 
)
core::chemical::ResidueTypeSet::~ResidueTypeSet ( )
virtual
core::chemical::ResidueTypeSet::ResidueTypeSet ( ResidueTypeSet const &  )
private

Member Function Documentation

ResidueTypeCOPs 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.

References aa_map_, and empty_residue_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

References aas_defined_.

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

end of aas_defined_ list

References aas_defined_.

void core::chemical::ResidueTypeSet::add_residue_type ( ResidueTypeOP  new_type)
void core::chemical::ResidueTypeSet::add_residue_type_to_maps ( ResidueTypeOP  rsd)
private
const_residue_iterator core::chemical::ResidueTypeSet::all_residues_begin ( ) const
inline

References name_map_.

const_residue_iterator core::chemical::ResidueTypeSet::all_residues_end ( ) const
inline

References name_map_.

void core::chemical::ResidueTypeSet::apply_patches ( utility::vector1< std::string > const &  filenames)
void core::chemical::ResidueTypeSet::clear_residue_maps ( )
private
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(), core::chemical::ResidueType::defined_adducts(), and residue_types_.

Referenced by place_adducts().

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

accessor for database_directory

References 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(), name_map_, core::chemical::residue_type_base_name(), residue_types_, 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(), name_map_, core::chemical::residue_type_base_name(), residue_types_, 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.

References name3_map_.

std::string const& core::chemical::ResidueTypeSet::name ( ) const
inline
ResidueTypeCOPs 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.

References empty_residue_list_, and name3_map_.

Referenced by protocols::swa::rna::StepWiseRNA_PoseSetup::add_aa_virt_rsd_as_root(), protocols::rna::RNA_StructureParameters::append_virtual_anchor(), core::io::pdb::build_pose_as_is1(), and protocols::ligand_docking::HighResDocker::enable_ligand_rotamer_packing().

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.

References nonconst_name_map_.

Referenced by remove_residue_type().

ResidueTypeSet const& core::chemical::ResidueTypeSet::operator= ( ResidueTypeSet const &  )
private
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(), residue_types(), residue_types_, and update_residue_maps().

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().

void core::chemical::ResidueTypeSet::remove_residue_type ( std::string const &  name)
void core::chemical::ResidueTypeSet::remove_residue_type_from_maps ( ResidueTypeOP  rsd)
private
ResidueTypeCOPs const& core::chemical::ResidueTypeSet::residue_types ( ) const
inline
void core::chemical::ResidueTypeSet::select_residues ( ResidueSelector const &  selector,
ResidueTypeCOPs matches 
) const

select a set of ResidueTypes give certain criteria

selection done by ResidueSelector class

References residue_types_.

void core::chemical::ResidueTypeSet::update_residue_maps ( )
private

update residue maps

check that residue id map should be unique, sort the aas_defined list and make its membe unique

References aas_defined_, add_residue_type_to_maps(), clear_residue_maps(), residue_types_, and residue_types_const_.

Referenced by apply_patches(), place_adducts(), read_files(), and ResidueTypeSet().

Member Data Documentation

std::map< AA, ResidueTypeCOPs > core::chemical::ResidueTypeSet::aa_map_
private
std::list< AA > core::chemical::ResidueTypeSet::aas_defined_
private
const std::string core::chemical::ResidueTypeSet::database_directory_
private

the database directory of the generating files —> allows to use cached dunbrack libs

Referenced by database_directory().

ResidueTypeCOPs core::chemical::ResidueTypeSet::empty_residue_list_
private

null list of residues when query fails

Referenced by aa_map(), and name3_map().

std::map< std::string, ResidueTypeCOPs > core::chemical::ResidueTypeSet::name3_map_
private
std::string core::chemical::ResidueTypeSet::name_
private

What does the ChemicalManager call this ResidueTypeSet?

Referenced by name().

std::map< std::string, ResidueTypeCOP > core::chemical::ResidueTypeSet::name_map_
private
std::map< std::string, ResidueTypeOP > core::chemical::ResidueTypeSet::nonconst_name_map_
private

map to ResidueType pointers by unique residue id, for nonconst access

Referenced by add_residue_type_to_maps(), clear_residue_maps(), nonconst_name_map(), and remove_residue_type_from_maps().

ResidueTypeOPs core::chemical::ResidueTypeSet::residue_types_
private
ResidueTypeCOPs core::chemical::ResidueTypeSet::residue_types_const_
private

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