Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
core::chemical::ResidueTypeSet Class Referenceabstract

An abstract interface to a set of ResidueTypes. More...

#include <ResidueTypeSet.hh>

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

Public Member Functions

 ResidueTypeSet (TypeSetMode mode=INVALID_t)
 default c-tor More...
 
 ~ResidueTypeSet ()
 
ResidueTypeSetCOP get_self_ptr () const
 
ResidueTypeSetCAP get_self_weak_ptr () const
 
AtomTypeSetCOP atom_type_set () const
 
ElementSetCOP element_set () const
 
MMAtomTypeSetCOP mm_atom_type_set () const
 
orbitals::OrbitalTypeSetCOP orbital_type_set () const
 
TypeSetMode mode () const
 The type of the ResidueTypeSet. More...
 
virtual ResidueType const & name_map (std::string const &name) const
 query ResidueType by its unique residue id. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual ResidueTypeCOP name_mapOP (std::string const &name) const
 Get ResidueType by exact name, returning COP. Will return null pointer for no matches. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual bool has_name (std::string const &name) const
 query if a ResidueType of the unique residue id (name) is present. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
bool has_name3 (std::string const &name3) const
 query if any ResidueTypes in the set have a "name3" that matches the input name3 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
bool has_interchangeability_group (std::string const &name) const
 Does this ResidueTypeSet have ResidueTypes with the given interchangeability group? Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueTypeCOP get_representative_type_aa (AA aa, utility::vector1< std::string > const &variants) const
 Get the base ResidueType with the given aa type and variants. More...
 
ResidueTypeCOP get_representative_type_aa (AA aa) const
 
ResidueTypeCOP get_representative_type_name1 (char name1, utility::vector1< std::string > const &variants) const
 Get the base ResidueType with the given name1 and variants. More...
 
ResidueTypeCOP get_representative_type_name1 (char name1) const
 
ResidueTypeCOP get_representative_type_name3 (std::string const &name3, utility::vector1< std::string > const &variants) const
 Get the base ResidueType with the given name3 and variants. More...
 
ResidueTypeCOP get_representative_type_name3 (std::string const &name3) const
 
ResidueTypeCOP get_representative_type_base_name (std::string const &base_name) const
 
ResidueTypeCOPs get_base_types_aa (AA aa) const
 Gets all non-patched types with the given aa type Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueTypeCOPs get_base_types_name1 (char name1) const
 Get all non-patched ResidueTypes with the given name1 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueTypeCOPs get_base_types_name3 (std::string const &name3) const
 Get all non-patched ResidueTypes with the given name3 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual ResidueTypeCOP get_d_equivalent (ResidueTypeCOP l_rsd) const
 Given a D-residue, get its L-equivalent. More...
 
virtual ResidueTypeCOP get_l_equivalent (ResidueTypeCOP d_rsd) const
 Given an L-residue, get its D-equivalent. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual ResidueTypeCOP get_mirrored_type (ResidueTypeCOP original_rsd) const
 Given a residue, get its mirror-image type. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual bool generates_patched_residue_type_with_name3 (std::string const &base_residue_name, std::string const &name3) const
 Check if a base type (like "SER") generates any types with another name3 (like "SEP") Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual bool generates_patched_residue_type_with_interchangeability_group (std::string const &base_residue_name, std::string const &interchangeability_group) const
 Check if a base type (like "CYS") generates any types with a new interchangeability group (like "SCY" (via cys_acetylated)) Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueTypeCOPs get_all_types_with_variants_name1 (char name1, utility::vector1< std::string > const &variants) const
 Get all non-patched ResidueTypes with the given name1 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueTypeCOPs get_all_types_with_variants_name3 (std::string const &name3, utility::vector1< std::string > const &variants) const
 Get all non-patched ResidueTypes with the given name3 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. 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 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueType const & get_residue_type_with_variant_added (ResidueType const &init_rsd, std::string const &new_type) const
 
ResidueType const & get_residue_type_with_custom_variant_added (ResidueType const &init_rsd, std::string const &new_type) const
 
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 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
MergeBehaviorManager const & merge_behavior_manager () const
 accessor for merge behavior manager More...
 
virtual ResidueTypeCOPs base_residue_types () const
 The list of ResidueTypes that don't have any patches, but can be patched. More...
 
virtual ResidueTypeCOPs unpatchable_residue_types () const
 The list of ResidueTypes which shouldn't get patches applied to them. More...
 
virtual utility::vector1
< PatchCOP
patches () const
 the patches More...
 
virtual utility::vector1
< MetapatchCOP
metapatches () const
 the metapatches More...
 
virtual std::map< std::string,
utility::vector1< PatchCOP >
> const & 
patch_map () const
 the patches, index by name. More...
 
virtual std::map< std::string,
MetapatchCOP > const & 
metapatch_map () const
 the metapatches, index by name. More...
 
virtual bool has_metapatch (std::string const &name) const
 Do we have this metapatch? More...
 
virtual MetapatchCOP metapatch (std::string const &name) const
 
virtual ResidueTypeCOPs get_all_types_with_variants_aa (AA aa, utility::vector1< std::string > const &variants) const
 Gets all types with the given aa type and variants Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
virtual ResidueTypeCOPs get_all_types_with_variants_aa (AA aa, utility::vector1< std::string > const &variants, utility::vector1< VariantType > const &exceptions) const
 Gets all types with the given aa type and variants, making exceptions for some variants. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache. More...
 
ResidueTypeCOPs get_all_types_with_variants_by_basetype (ResidueTypeCOP base_type, utility::vector1< VariantType > const &variants, utility::vector1< std::string > const &variant_strings, utility::vector1< VariantType > const &exceptions, bool const no_metapatches) const
 Given a base residue type, desired variants, and undesired variants, retrieve a list of cached ResidueTypeCOPs. If not cached, generate the data and cache them. More...
 

Protected Member Functions

void atom_type_set (AtomTypeSetCOP atom_types)
 
void element_set (ElementSetCOP elements)
 
void mm_atom_type_set (MMAtomTypeSetCOP mm_atom_types)
 
void orbital_type_set (orbitals::OrbitalTypeSetCOP orbital_types)
 
void prep_restype (MutableResidueTypeOP new_type) const
 Centralize the steps for preparing the ResidueType for addition to the RTS (e.g. if there's any additional modifications that need to get done.) More...
 
virtual void add_base_residue_type (MutableResidueTypeOP new_type)
 adds a new base residue type to the set, one that isn't patched, but can be. (Needs a modifiable type so that it can call prep_restype() on it.) Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. More...
 
virtual void force_add_base_residue_type_already_write_locked (MutableResidueTypeOP new_type) const
 Force the addition of a new residue type despite a const context. More...
 
virtual void add_base_residue_type (std::string const &filename)
 adds a new residue type to the set, one that can be patched Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. More...
 
virtual void read_files_for_base_residue_types (utility::vector1< std::string > const &filenames)
 adds new residue types, ones that can be patched Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. More...
 
virtual void add_unpatchable_residue_type (MutableResidueTypeOP new_type)
 adds a new residue type to the set, one that CANNOT be generated from a base_residue_type and patches, and shouldn't have patches applied (Needs a modifiable type so that it can call prep_restype() on it.) Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. More...
 
virtual void add_unpatchable_residue_type (std::string const &filename)
 adds a new residue type to the set, one that CANNOT be generated from a base_residue_type and patches, and shouldn't have patches applied Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. More...
 
virtual void read_files_for_unpatchable_residue_types (utility::vector1< std::string > const &filenames)
 adds new residue types, ones that CANNOT be generated from a base_residue_type and patches, and shouldn't have patches applied Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. More...
 
virtual void remove_base_residue_type (std::string const &name)
 delete an base residue type from the set (Use with care) Currently will not remove any patched types Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. In any case, this is not a thread-safe function as it will invariably lead to race conditions if the RTS is shared between two threads. This method is only to be used on PoseResidueTypeSet objects (the GlobalResidueTypeSet class will exit if you call it), and these objects must not be shared between two threads. More...
 
virtual void remove_unpatchable_residue_type (std::string const &name)
 delete an unpatchable residue type from the set (Use with care) Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. In any case, this is not a thread-safe function as it will invariably lead to race conditions if the RTS is shared between two threads. This method is only to be used on PoseResidueTypeSet objects (the GlobalResidueTypeSet class will exit if you call it), and these objects must not be shared between two threads. More...
 
virtual void add_patch (PatchCOP p)
 Add a patch object to the RTS. More...
 
virtual void add_metapatch (MetapatchCOP p)
 Add a metapatch object to the RTS. More...
 
bool update_base_residue_types_if_replaced (ResidueTypeCOP rsd_type, ResidueTypeCOP rsd_type_new)
 helper function used during replacing residue types after, e.g., orbitals. Does not lock the RTSC, but does modify the RTS and should not be used outside of construction in a multi-threaded context More...
 
void mode (TypeSetMode setting)
 
ResidueTypeSetCacheOP cache_object () const
 The alterable cache object. More...
 
virtual ResidueTypeCOP generate_residue_type (std::string const &rsd_name) const
 Template method invoked by the base class to be overridden by the derived class when a not-yet-generated ResidueType is requested by name. The function returns the COP of the ResidueType if it can be generated, and a nullptr if it cannot. More...
 
MutableResidueTypeCOP apply_patch (ResidueTypeCOP const &rsd_base_ptr, std::string const &patch_name, std::map< std::string, utility::vector1< PatchCOP > > const &patch_mapping, std::map< std::string, MetapatchCOP > const &metapach_mapping) const
 Static method which will apply a given patch to a given ResidueType If the patch cannot be applies, it will return nullptr. More...
 
virtual ResidueTypeCOP name_mapOP_write_locked (std::string const &name) const
 Template method to return a residue type with the given name, updating the ResidueTypeSetCache as needed – meant to be overridden by the derived ResidueTypeSet. Note that this method must only be called by a function that has obtained a write lock or a function that itself requires a write lock to call it. The derived class's version of this method must not attempt to call any function that would itself try to obtain a read- or write lock on the ResidueTypeSetCache. More...
 
virtual bool has_name_write_locked (std::string const &name) const
 Template method to return whether a residue type with a given name is creatable or has already been created; meant to be overridden by the derived ResidueTypeSet. Note that this should only be invoked after a write lock has been obtained on the ResidueTypeSetCache (e.g. inside functions within the generate_residue_type call chain); and that the derived class's version of this function must assume a write lock has already been obtained when it is invoked. Therefore, it must not attempt to call any function that would itself try and obtain a read or write lock. More...
 
virtual ResidueTypeCOP generate_residue_type_write_locked (std::string const &rsd_name) const
 Template method to recursively determine whether or not the requested residue type exists / can be created in this ResidueTypeSet – meant to be overridden by the derived ResidueTypeSet. More...
 
virtual bool lazy_load_base_type_already_write_locked (std::string const &rsd_base_name) const =0
 Attempt to lazily load the given residue type from data. This function will only be called when the RTS has already obtained a write lock on the ResidueTypeSetCache. More...
 
void figure_out_last_patch_from_name (std::string const &rsd_name, std::string &rsd_name_base, std::string &patch_name) const
 
virtual void add_patches (utility::vector1< std::string > const &patch_filenames, utility::vector1< std::string > const &metapatch_filenames)
 
virtual void set_merge_behavior_manager (MergeBehaviorManagerCOP mbm)
 
std::map< ResidueTypeCOP,
ResidueTypeCOP > & 
l_to_d_mapping ()
 A list of L-chirality base types with an equivalent D-chirality base type. More...
 
std::map< ResidueTypeCOP,
ResidueTypeCOP > & 
d_to_l_mapping ()
 A list of D-chirality base types with an equivalent L-chirality base type. More...
 
 ResidueTypeSet (ResidueTypeSet const &)
 
ResidueTypeSetoperator= (ResidueTypeSet const &)=delete
 

Private Attributes

AtomTypeSetCOP atom_types_
 
ElementSetCOP elements_
 
MMAtomTypeSetCOP mm_atom_types_
 
orbitals::OrbitalTypeSetCOP orbital_types_
 
TypeSetMode mode_
 What sort of TypeSet is this? More...
 
MergeBehaviorManagerCOP merge_behavior_manager_
 
ResidueTypeSetCacheOP cache_
 all cached residue_type information including generated residue_types, name3_map, etc. By making the following an OP (instead of an object) the cache effectively becomes mutable even when in a const ResidueTypeSet. Direct access to the cache_ must never be provided; thread safety relies on the ResidueTypeSet maintaining strict control over its cache More...
 
ResidueTypeCOPs base_residue_types_
 ResidueTypes that don't have any patches, but can be patched. More...
 
ResidueTypeCOPs unpatchable_residue_types_
 ResidueTypes which shouldn't get patches applied to them. More...
 
utility::vector1< PatchCOPpatches_
 the patches More...
 
utility::vector1< MetapatchCOPmetapatches_
 
std::map< std::string,
utility::vector1< PatchCOP > > 
patch_map_
 patches indexed by name More...
 
std::map< std::string,
MetapatchCOP
metapatch_map_
 
std::map< ResidueTypeCOP,
ResidueTypeCOP
l_to_d_mapping_
 A list of L-chirality base types with an equivalent D-chirality base type. More...
 
std::map< ResidueTypeCOP,
ResidueTypeCOP
d_to_l_mapping_
 A list of D-chirality base types with an equivalent L-chirality base type. More...
 

Detailed Description

An abstract interface to a set of ResidueTypes.

One thing that is not nailed down is whether a single ResidueTypeSet can have ResidueTypes with different AtomTypeSets. (PB-07/07)

The answer is NO – or at least a ResidueTypeSet shouldn't have ResidueTypes with different mode() values, which in most cases are determined by the AtomTypeSet being used. - Though two different AtomTypeSets with the same mode may be permitted. (RM-11/16)

Constructor & Destructor Documentation

core::chemical::ResidueTypeSet::ResidueTypeSet ( TypeSetMode  mode = INVALID_t)

default c-tor

core::chemical::ResidueTypeSet::~ResidueTypeSet ( )
default
core::chemical::ResidueTypeSet::ResidueTypeSet ( ResidueTypeSet const &  src)
protected

References cache_.

Member Function Documentation

void core::chemical::ResidueTypeSet::add_base_residue_type ( MutableResidueTypeOP  new_type)
protectedvirtual
void core::chemical::ResidueTypeSet::add_base_residue_type ( std::string const &  filename)
protectedvirtual

adds a new residue type to the set, one that can be patched Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain.

Reimplemented in core::chemical::PoseResidueTypeSet.

References add_base_residue_type(), atom_type_set(), element_set(), mm_atom_type_set(), orbital_type_set(), and core::chemical::read_topology_file().

void core::chemical::ResidueTypeSet::add_metapatch ( MetapatchCOP  p)
protectedvirtual

Add a metapatch object to the RTS.

Reimplemented in core::chemical::PoseResidueTypeSet.

References metapatch_map_, and metapatches_.

Referenced by core::chemical::PoseResidueTypeSet::add_metapatch(), and add_patches().

void core::chemical::ResidueTypeSet::add_patch ( PatchCOP  p)
protectedvirtual

Add a patch object to the RTS.

Reimplemented in core::chemical::PoseResidueTypeSet.

References patch_map_, and patches_.

Referenced by core::chemical::PoseResidueTypeSet::add_patch(), and add_patches().

void core::chemical::ResidueTypeSet::add_patches ( utility::vector1< std::string > const &  patch_filenames,
utility::vector1< std::string > const &  metapatch_filenames 
)
protectedvirtual
void core::chemical::ResidueTypeSet::add_unpatchable_residue_type ( MutableResidueTypeOP  new_type)
protectedvirtual

adds a new residue type to the set, one that CANNOT be generated from a base_residue_type and patches, and shouldn't have patches applied (Needs a modifiable type so that it can call prep_restype() on it.) Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain.

Reimplemented in core::chemical::PoseResidueTypeSet.

References cache_object(), core::chemical::ResidueType::make(), mode(), prep_restype(), core::chemical::TR(), and unpatchable_residue_types_.

Referenced by core::chemical::PoseResidueTypeSet::add_unpatchable_residue_type(), add_unpatchable_residue_type(), core::chemical::GlobalResidueTypeSet::place_adducts(), and read_files_for_unpatchable_residue_types().

void core::chemical::ResidueTypeSet::add_unpatchable_residue_type ( std::string const &  filename)
protectedvirtual

adds a new residue type to the set, one that CANNOT be generated from a base_residue_type and patches, and shouldn't have patches applied Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain.

Reimplemented in core::chemical::PoseResidueTypeSet.

References add_unpatchable_residue_type(), atom_type_set(), element_set(), mm_atom_type_set(), orbital_type_set(), and core::chemical::read_topology_file().

MutableResidueTypeCOP core::chemical::ResidueTypeSet::apply_patch ( ResidueTypeCOP const &  rsd_base_ptr,
std::string const &  patch_name,
std::map< std::string, utility::vector1< PatchCOP > > const &  patch_mapping,
std::map< std::string, MetapatchCOP > const &  metapach_mapping 
) const
protected

Static method which will apply a given patch to a given ResidueType If the patch cannot be applies, it will return nullptr.

This should not touch any mutex-protected data.

References mode(), patches(), prep_restype(), and core::chemical::TR().

Referenced by core::chemical::PoseResidueTypeSet::generate_residue_type_write_locked(), and generate_residue_type_write_locked().

AtomTypeSetCOP core::chemical::ResidueTypeSet::atom_type_set ( ) const
inline
void core::chemical::ResidueTypeSet::atom_type_set ( AtomTypeSetCOP  atom_types)
protected
virtual ResidueTypeCOPs core::chemical::ResidueTypeSet::base_residue_types ( ) const
inlinevirtual
ResidueTypeSetCacheOP core::chemical::ResidueTypeSet::cache_object ( ) const
inlineprotected
std::map< ResidueTypeCOP , ResidueTypeCOP >& core::chemical::ResidueTypeSet::d_to_l_mapping ( )
inlineprotected

A list of D-chirality base types with an equivalent L-chirality base type.

References d_to_l_mapping_.

Referenced by core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases().

ElementSetCOP core::chemical::ResidueTypeSet::element_set ( ) const
inline
void core::chemical::ResidueTypeSet::element_set ( ElementSetCOP  elements)
inlineprotected

References elements_.

void core::chemical::ResidueTypeSet::figure_out_last_patch_from_name ( std::string const &  rsd_name,
std::string &  rsd_name_base,
std::string &  patch_name 
) const
protected

Invoked only during residue-type construction of get_residue_type_write_locked, and so it must invoke the version of has_name that presumes a write lock has been obtained already (and will thus not invoke another function that tries to establish either a read or a write lock on the ResidueTypeSetCache)

References has_name_write_locked(), and core::chemical::PATCH_LINKER.

Referenced by core::chemical::PoseResidueTypeSet::generate_residue_type_write_locked(), and generate_residue_type_write_locked().

void core::chemical::ResidueTypeSet::force_add_base_residue_type_already_write_locked ( MutableResidueTypeOP  new_type) const
protectedvirtual

Force the addition of a new residue type despite a const context.

Danger! Only intended for rare use cases in which there is no other way to allow a new base type to be added.

Note
Creates no write lock. Can be called from the generate_residue_type_write_locked call chain, but not threadsafe unless a write lock is obtained outside of this function.
Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).

References base_residue_types_, cache_object(), core::chemical::ResidueType::make(), mode(), prep_restype(), and core::chemical::TR().

Referenced by core::chemical::GlobalResidueTypeSet::lazy_load_base_type_already_write_locked().

ResidueTypeCOP core::chemical::ResidueTypeSet::generate_residue_type ( std::string const &  rsd_name) const
protectedvirtual

Template method invoked by the base class to be overridden by the derived class when a not-yet-generated ResidueType is requested by name. The function returns the COP of the ResidueType if it can be generated, and a nullptr if it cannot.

If the requested ResidueType has not been generated yet, then this function will obtain a write lock on the ResidueTypeSetCache and generate it. If it has already been generated, then this function will obtain a read lock. This function should not be invoked by a function that has already obtained either a read or a write lock.

References cache_, cache_object(), and generate_residue_type_write_locked().

ResidueTypeCOP core::chemical::ResidueTypeSet::generate_residue_type_write_locked ( std::string const &  rsd_name) const
protectedvirtual

Template method to recursively determine whether or not the requested residue type exists / can be created in this ResidueTypeSet – meant to be overridden by the derived ResidueTypeSet.

This function is invoked after a write lock has been obtained on the ResidueTypeSetCache, and so it should not invoke either name_mapOP or generate_residue_type as both of these will also attempt to create locks, and would thus deadlock.

Instantiates ResidueType recursively, peeling off the last-most patch and generating the patched ResidueType from the base ResidueType and the corresponding Patch, recursively generating the base ResidueType if necessary. The function that calls this function must first obtain a write lock

Reimplemented in core::chemical::PoseResidueTypeSet.

References apply_patch(), cache_object(), figure_out_last_patch_from_name(), lazy_load_base_type_already_write_locked(), core::chemical::ResidueType::make(), metapatch_map(), name_mapOP_write_locked(), and patch_map().

Referenced by generate_residue_type(), has_name(), has_name_write_locked(), and name_mapOP_write_locked().

bool core::chemical::ResidueTypeSet::generates_patched_residue_type_with_interchangeability_group ( std::string const &  base_residue_name,
std::string const &  interchangeability_group 
) const
virtual

Check if a base type (like "CYS") generates any types with a new interchangeability group (like "SCY" (via cys_acetylated)) Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Check if a base type (like "CYS") generates any types with a new interchangeability group (like "SCY" (via cys_acetylated))

Reimplemented in core::chemical::PoseResidueTypeSet.

References cache_object().

Referenced by core::chemical::ResidueTypeFinder::filter_by_interchangeability_group(), core::chemical::ResidueTypeFinder::fixes_interchangeability_group(), and core::chemical::PoseResidueTypeSet::generates_patched_residue_type_with_interchangeability_group().

bool core::chemical::ResidueTypeSet::generates_patched_residue_type_with_name3 ( std::string const &  base_residue_name,
std::string const &  name3 
) const
virtual

Check if a base type (like "SER") generates any types with another name3 (like "SEP") Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Check if a base type (like "SER") generates any types with another name3 (like "SEP")

Reimplemented in core::chemical::PoseResidueTypeSet.

References cache_object().

Referenced by core::chemical::ResidueTypeFinder::filter_by_name3(), core::chemical::ResidueTypeFinder::fixes_name3(), core::chemical::PoseResidueTypeSet::generates_patched_residue_type_with_name3(), and core::chemical::ResidueTypeFinder::initialize_relevant_pdb_components().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_all_types_with_variants_aa ( AA  aa,
utility::vector1< std::string > const &  variants 
) const
virtual

Gets all types with the given aa type and variants Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Gets all types with the given aa type and variants.

The number of variants must match exactly. Variants can be custom variants. (It's assumed that the passed VariantTypeList contains no duplicates.)

The number of variants must match exactly. (It's assumed that the passed VariantTypeList contains no duplicates.)

Reimplemented in core::chemical::GlobalResidueTypeSet, and core::chemical::PoseResidueTypeSet.

Referenced by core::chemical::PoseResidueTypeSet::get_all_types_with_variants_aa(), and core::chemical::GlobalResidueTypeSet::get_all_types_with_variants_aa().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_all_types_with_variants_aa ( AA  aa,
utility::vector1< std::string > const &  variants,
utility::vector1< VariantType > const &  exceptions 
) const
virtual

Gets all types with the given aa type and variants, making exceptions for some variants. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

The number of variants must match exactly. Variants can be custom variants, but exceptions must be standard types, listed in VariantType.hh. (It's assumed that the passed VariantTypeList contains no duplicates.)

Reimplemented in core::chemical::GlobalResidueTypeSet, and core::chemical::PoseResidueTypeSet.

References core::chemical::ResidueTypeFinder::aa(), cache_object(), core::chemical::ResidueTypeFinder::get_all_possible_residue_types(), core::chemical::ResidueTypeFinder::variant_exceptions(), and core::chemical::ResidueTypeFinder::variants().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_all_types_with_variants_by_basetype ( ResidueTypeCOP  base_type,
utility::vector1< VariantType > const &  variants,
utility::vector1< std::string > const &  variant_strings,
utility::vector1< VariantType > const &  exceptions,
bool const  no_metapatches 
) const

Given a base residue type, desired variants, and undesired variants, retrieve a list of cached ResidueTypeCOPs. If not cached, generate the data and cache them.

Parameters
[in]base_typeA ResidueTypeCOP to a base residue type, used for looking up the variant.
[in]variantsA list of VariantTypes that the returned ResidueTypes must have, used for looking up the variant.
[in]variant_stringsA list of custom VariantTypes (that don't have enums) that the returned ResidueTypes must have, used for looking up the variant.
[in]exceptionsA list of VariantTypes that are ignored in matching.
[in]no_metapatchesIf true, metapatches are ignored.
Returns
A list of ResidueTypeCOPs matching the desired variants, with the desired base type.
Note
This function is threadsafe. Caching and retrieveal are handled with a ReadWriteMutex.
Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).
Parameters
[in]base_typeA ResidueTypeCOP to a base residue type, used for looking up the variant.
[in]variantsA list of VariantTypes that the returned ResidueTypes must have; used for looking up the variant.
[in]variant_stringsA list of custom VariantTypes (that don't have enums) that the returned ResidueTypes must have, used for looking up the variant.
[in]exceptionsA list of VariantTypes that are ignored in matching.
[in]no_metapatchesIf true, metapatches are ignored.
Returns
A list of ResidueTypeCOPs matching the desired variants, with the desired base type.
Note
This function is threadsafe. Caching and retrieveal are handled with a ReadWriteMutex.
Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org).

References core::chemical::ResidueTypeFinder::base_type(), cache_object(), core::chemical::ResidueTypeFinder::disable_metapatches(), core::chemical::ResidueTypeFinder::get_all_possible_residue_types(), core::chemical::ResidueTypeFinder::variant_exceptions(), and core::chemical::ResidueTypeFinder::variants().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_all_types_with_variants_name1 ( char  name1,
utility::vector1< std::string > const &  variants 
) const

Get all non-patched ResidueTypes with the given name1 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Gets all types with the given name1 and variants.

The number of variants must match exactly. (It's assumed that the passed VariantTypeList contains no duplicates.)

Get all non-patched ResidueTypes with the given name1

The number of variants must match exactly. (It's assumed that the passed VariantTypeList contains no duplicates.)

References core::chemical::ResidueTypeFinder::get_all_possible_residue_types(), core::chemical::ResidueTypeFinder::name1(), and core::chemical::ResidueTypeFinder::variants().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_all_types_with_variants_name3 ( std::string const &  name3,
utility::vector1< std::string > const &  variants 
) const

Get all non-patched ResidueTypes with the given name3 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Gets all types with the given name3 and variants.

The number of variants must match exactly. (It's assumed that the passed VariantTypeList contains no duplicates.)

References core::chemical::ResidueTypeFinder::get_all_possible_residue_types(), core::chemical::ResidueTypeFinder::name3(), and core::chemical::ResidueTypeFinder::variants().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_base_types_aa ( AA  aa) const

Gets all non-patched types with the given aa type Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Gets all non-patched types with the given aa type.

References core::chemical::ResidueTypeFinder::aa(), and core::chemical::ResidueTypeFinder::get_possible_base_residue_types().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_base_types_name1 ( char  name1) const

Get all non-patched ResidueTypes with the given name1 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Get all non-patched ResidueTypes with the given name1.

References core::chemical::ResidueTypeFinder::get_possible_base_residue_types(), and core::chemical::ResidueTypeFinder::name1().

ResidueTypeCOPs core::chemical::ResidueTypeSet::get_base_types_name3 ( std::string const &  name3) const

Get all non-patched ResidueTypes with the given name3 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Get all non-patched ResidueTypes with the given name3.

References core::chemical::ResidueTypeFinder::get_possible_base_residue_types(), and core::chemical::ResidueTypeFinder::name3().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_d_equivalent ( ResidueTypeCOP  l_rsd) const
virtual

Given a D-residue, get its L-equivalent.

Given an L-residue, get its D-equivalent.

Returns NULL if there is no equivalent, true otherwise. Throws an error if this is not a D-residue. Preserves variant types. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Note
Works for L-amino acids and L-peptoids (peptoids with chiral "L" sidechains").
Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Returns NULL if there is no equivalent, true otherwise. Throws an error if this is not a D-residue. Preserves variant types.

Note
Works for L-amino acids and L-peptoids (peptoids with chiral "L" sidechains").
Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Reimplemented in core::chemical::PoseResidueTypeSet.

References core::chemical::ResidueTypeFinder::base_type(), core::chemical::ResidueTypeFinder::get_representative_type(), l_to_d_mapping_, and core::chemical::ResidueTypeFinder::variants().

Referenced by get_mirrored_type().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_l_equivalent ( ResidueTypeCOP  d_rsd) const
virtual

Given an L-residue, get its D-equivalent. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Given an D-residue, get its L-equivalent.

Returns NULL if there is no equivalent, true otherwise. Throws an error if this is not an L-residue. Preserves variant types.

Note
Works for D-amino acids and D-peptoids (peptoids with chiral "D" sidechains").
Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Reimplemented in core::chemical::PoseResidueTypeSet.

References core::chemical::ResidueTypeFinder::base_type(), d_to_l_mapping_, core::chemical::ResidueTypeFinder::get_representative_type(), and core::chemical::ResidueTypeFinder::variants().

Referenced by get_mirrored_type().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_mirrored_type ( ResidueTypeCOP  original_rsd) const
virtual

Given a residue, get its mirror-image type. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Given a residue, get its mirror-image type.

Returns the same residue if this is an ACHIRAL type (e.g. gly), the D-equivalent for an L-residue, the L-equivalent of a D-residue, or NULL if this is an L-residue with no D-equivalent (or a D- with no L-equivalent). Preserves variant types.

Reimplemented in core::chemical::PoseResidueTypeSet.

References get_d_equivalent(), and get_l_equivalent().

Referenced by core::conformation::Residue::clone_flipping_chirality().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_aa ( AA  aa,
utility::vector1< std::string > const &  variants 
) const

Get the base ResidueType with the given aa type and variants.

Returns 0 if one does not exist. The returned type will have at least all the variants given, but may have more if a minimal variant type isn't availible. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Returns 0 if one does not exist.

References core::chemical::ResidueTypeFinder::aa(), core::chemical::ResidueTypeFinder::get_representative_type(), and core::chemical::ResidueTypeFinder::variants().

Referenced by protocols::dna::DnaInterfacePacker::add_complementary_sequence(), get_representative_type_aa(), and core::fragment::make_pose_from_sequence_().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_aa ( AA  aa) const

Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

References get_representative_type_aa(), and update_ResidueType_enum_files::variants.

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_base_name ( std::string const &  base_name) const

Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

References core::chemical::ResidueTypeFinder::get_representative_type(), and core::chemical::ResidueTypeFinder::residue_base_name().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_name1 ( char  name1,
utility::vector1< std::string > const &  variants 
) const

Get the base ResidueType with the given name1 and variants.

Returns 0 if one does not exist. The returned type will have at least all the variants given, but may have more if a minimal variant type isn't availible. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Returns 0 if one does not exist.

References core::chemical::ResidueTypeFinder::get_representative_type(), core::chemical::ResidueTypeFinder::name1(), and core::chemical::ResidueTypeFinder::variants().

Referenced by get_representative_type_name1().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_name1 ( char  name1) const

Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

References get_representative_type_name1(), and update_ResidueType_enum_files::variants.

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_name3 ( std::string const &  name3,
utility::vector1< std::string > const &  variants 
) const

Get the base ResidueType with the given name3 and variants.

Returns 0 if one does not exist. The returned type will have at least all the variants given, but may have more if a minimal variant type isn't availible. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

Returns 0 if one does not exist.

References core::chemical::ResidueTypeFinder::get_representative_type(), core::chemical::ResidueTypeFinder::name3(), and core::chemical::ResidueTypeFinder::variants().

Referenced by get_representative_type_name3(), has_name3(), core::util::switch_to_centroid_rot_set(), and core::util::switch_to_residue_type_set().

ResidueTypeCOP core::chemical::ResidueTypeSet::get_representative_type_name3 ( std::string const &  name3) const

Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

References get_representative_type_name3(), and update_ResidueType_enum_files::variants.

ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_custom_variant_added ( ResidueType const &  init_rsd,
std::string const &  new_type 
) const
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 for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

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 (i.e., different .params files).
Remarks
TODO: This should be refactored to make better use of the new ResidueProperties system. ~Labonte AMW refactored this to redirect to a string-using version because we only use VariantType strings within and I have need of direct invocation of a string version anyway. Actually, I'm going to keep this redirect but I NEED to refer to it as a 'custom variant' unfortunately.

References core::chemical::ResidueProperties::get_string_from_variant().

Referenced by protocols::environment::add_variant(), core::pose::make_pose_from_saccharide_sequence(), and core::pose::residue_types_from_saccharide_sequence_recursive().

ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_variant_added ( ResidueType const &  init_rsd,
std::string const &  new_type 
) const
ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_variant_removed ( ResidueType const &  init_rsd,
VariantType const  old_type 
) const
ResidueTypeSetCOP core::chemical::ResidueTypeSet::get_self_ptr ( ) const
inline
ResidueTypeSetCAP core::chemical::ResidueTypeSet::get_self_weak_ptr ( ) const
inline
bool core::chemical::ResidueTypeSet::has_interchangeability_group ( std::string const &  name) const

Does this ResidueTypeSet have ResidueTypes with the given interchangeability group? Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

References core::chemical::ResidueTypeFinder::get_representative_type(), and core::chemical::ResidueTypeFinder::interchangeability_group().

virtual bool core::chemical::ResidueTypeSet::has_metapatch ( std::string const &  name) const
inlinevirtual

Do we have this metapatch?

Reimplemented in core::chemical::PoseResidueTypeSet.

References metapatch_map_.

Referenced by metapatch().

bool core::chemical::ResidueTypeSet::has_name ( std::string const &  name_in) const
virtual

query if a ResidueType of the unique residue id (name) is present. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

checks if name exists.

actually instantiates the residue type if it does not yet exist.

References cache_, cache_object(), core::chemical::fixup_patches(), and generate_residue_type_write_locked().

Referenced by protocols::simple_filters::ResidueCountFilter::add_residue_type_by_name(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), remove_base_residue_type(), remove_unpatchable_residue_type(), and core::util::switch_to_residue_type_set().

bool core::chemical::ResidueTypeSet::has_name3 ( std::string const &  name3) const

query if any ResidueTypes in the set have a "name3" that matches the input name3 Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

any residue types with this name3?

References get_representative_type_name3().

bool core::chemical::ResidueTypeSet::has_name_write_locked ( std::string const &  name) const
protectedvirtual

Template method to return whether a residue type with a given name is creatable or has already been created; meant to be overridden by the derived ResidueTypeSet. Note that this should only be invoked after a write lock has been obtained on the ResidueTypeSetCache (e.g. inside functions within the generate_residue_type call chain); and that the derived class's version of this function must assume a write lock has already been obtained when it is invoked. Therefore, it must not attempt to call any function that would itself try and obtain a read or write lock.

References cache_object(), and generate_residue_type_write_locked().

Referenced by figure_out_last_patch_from_name().

std::map< ResidueTypeCOP , ResidueTypeCOP >& core::chemical::ResidueTypeSet::l_to_d_mapping ( )
inlineprotected

A list of L-chirality base types with an equivalent D-chirality base type.

References l_to_d_mapping_.

Referenced by core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases().

virtual bool core::chemical::ResidueTypeSet::lazy_load_base_type_already_write_locked ( std::string const &  rsd_base_name) const
protectedpure virtual

Attempt to lazily load the given residue type from data. This function will only be called when the RTS has already obtained a write lock on the ResidueTypeSetCache.

Implemented in core::chemical::PoseResidueTypeSet, and core::chemical::GlobalResidueTypeSet.

Referenced by generate_residue_type_write_locked().

MergeBehaviorManager const & core::chemical::ResidueTypeSet::merge_behavior_manager ( ) const

accessor for merge behavior manager

References merge_behavior_manager_.

virtual MetapatchCOP core::chemical::ResidueTypeSet::metapatch ( std::string const &  name) const
inlinevirtual
virtual std::map< std::string, MetapatchCOP > const& core::chemical::ResidueTypeSet::metapatch_map ( ) const
inlinevirtual
virtual utility::vector1< MetapatchCOP > core::chemical::ResidueTypeSet::metapatches ( ) const
inlinevirtual
MMAtomTypeSetCOP core::chemical::ResidueTypeSet::mm_atom_type_set ( ) const
inline
void core::chemical::ResidueTypeSet::mm_atom_type_set ( MMAtomTypeSetCOP  mm_atom_types)
inlineprotected

References mm_atom_types_.

TypeSetMode core::chemical::ResidueTypeSet::mode ( ) const
inline
void core::chemical::ResidueTypeSet::mode ( TypeSetMode  setting)
inlineprotected

References mode_.

ResidueType const & core::chemical::ResidueTypeSet::name_map ( std::string const &  name_in) const
virtual

query ResidueType by its unique residue id. Note for derived classes: this method will obtain a read lock, and possibly a write lock on the ResidueTypeSetCache.

since within a ResidueTypeSet, each residue id must be unique, this method only returns one residue type or it exits (the program!) without a match.

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

References name_mapOP().

Referenced by protocols::simple_moves::chiral::get_chiral_residue_type(), protocols::magnesium::get_useful_HOH_coords(), protocols::cyclic_peptide::PeptideStubMover::perform_single_iteration(), remove_base_residue_type(), remove_unpatchable_residue_type(), and core::util::switch_to_centroid_rot_set().

ResidueTypeCOP core::chemical::ResidueTypeSet::name_mapOP ( std::string const &  name_in) const
virtual
ResidueTypeCOP core::chemical::ResidueTypeSet::name_mapOP_write_locked ( std::string const &  name_in) const
protectedvirtual

Template method to return a residue type with the given name, updating the ResidueTypeSetCache as needed – meant to be overridden by the derived ResidueTypeSet. Note that this method must only be called by a function that has obtained a write lock or a function that itself requires a write lock to call it. The derived class's version of this method must not attempt to call any function that would itself try to obtain a read- or write lock on the ResidueTypeSetCache.

The calling function must first obtain a write lock on the ResidueTypeSetCache

References core::chemical::fixup_patches(), and generate_residue_type_write_locked().

Referenced by generate_residue_type_write_locked(), and name_mapOP().

ResidueTypeSet& core::chemical::ResidueTypeSet::operator= ( ResidueTypeSet const &  )
protecteddelete
orbitals::OrbitalTypeSetCOP core::chemical::ResidueTypeSet::orbital_type_set ( ) const
inline
void core::chemical::ResidueTypeSet::orbital_type_set ( orbitals::OrbitalTypeSetCOP  orbital_types)
inlineprotected

References orbital_types_.

virtual std::map< std::string, utility::vector1< PatchCOP > > const& core::chemical::ResidueTypeSet::patch_map ( ) const
inlinevirtual
virtual utility::vector1< PatchCOP > core::chemical::ResidueTypeSet::patches ( ) const
inlinevirtual
void core::chemical::ResidueTypeSet::prep_restype ( MutableResidueTypeOP  new_type) const
protected

Centralize the steps for preparing the ResidueType for addition to the RTS (e.g. if there's any additional modifications that need to get done.)

References core::chemical::gasteiger::assign_gasteiger_atom_types(), core::chemical::orbitals::AssignOrbitals::assign_orbitals(), and orbital_type_set().

Referenced by add_base_residue_type(), add_unpatchable_residue_type(), apply_patch(), and force_add_base_residue_type_already_write_locked().

void core::chemical::ResidueTypeSet::read_files_for_base_residue_types ( utility::vector1< std::string > const &  filenames)
protectedvirtual

adds new residue types, ones that can be patched Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain.

Reimplemented in core::chemical::PoseResidueTypeSet.

References add_base_residue_type(), and protocols::abinitio::filename().

Referenced by core::chemical::PoseResidueTypeSet::read_files_for_base_residue_types().

void core::chemical::ResidueTypeSet::read_files_for_unpatchable_residue_types ( utility::vector1< std::string > const &  filenames)
protectedvirtual

adds new residue types, ones that CANNOT be generated from a base_residue_type and patches, and shouldn't have patches applied Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain.

Reimplemented in core::chemical::PoseResidueTypeSet.

References add_unpatchable_residue_type(), and protocols::abinitio::filename().

Referenced by core::chemical::PoseResidueTypeSet::read_files_for_unpatchable_residue_types().

void core::chemical::ResidueTypeSet::remove_base_residue_type ( std::string const &  name)
protectedvirtual

delete an base residue type from the set (Use with care) Currently will not remove any patched types Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. In any case, this is not a thread-safe function as it will invariably lead to race conditions if the RTS is shared between two threads. This method is only to be used on PoseResidueTypeSet objects (the GlobalResidueTypeSet class will exit if you call it), and these objects must not be shared between two threads.

Reimplemented in core::chemical::GlobalResidueTypeSet, and core::chemical::PoseResidueTypeSet.

References base_residue_types_, cache_object(), has_name(), and name_map().

Referenced by core::chemical::PoseResidueTypeSet::remove_base_residue_type().

void core::chemical::ResidueTypeSet::remove_unpatchable_residue_type ( std::string const &  name)
protectedvirtual

delete an unpatchable residue type from the set (Use with care) Note: creates write lock on RTSC and must not be invoked in the generate_residue_type_write_locked call chain. In any case, this is not a thread-safe function as it will invariably lead to race conditions if the RTS is shared between two threads. This method is only to be used on PoseResidueTypeSet objects (the GlobalResidueTypeSet class will exit if you call it), and these objects must not be shared between two threads.

Reimplemented in core::chemical::GlobalResidueTypeSet, and core::chemical::PoseResidueTypeSet.

References cache_object(), has_name(), name_map(), and unpatchable_residue_types_.

Referenced by core::chemical::PoseResidueTypeSet::remove_unpatchable_residue_type().

void core::chemical::ResidueTypeSet::set_merge_behavior_manager ( MergeBehaviorManagerCOP  mbm)
protectedvirtual
virtual ResidueTypeCOPs core::chemical::ResidueTypeSet::unpatchable_residue_types ( ) const
inlinevirtual
bool core::chemical::ResidueTypeSet::update_base_residue_types_if_replaced ( ResidueTypeCOP  rsd_type,
ResidueTypeCOP  rsd_type_new 
)
protected

helper function used during replacing residue types after, e.g., orbitals. Does not lock the RTSC, but does modify the RTS and should not be used outside of construction in a multi-threaded context

helper function used during replacing residue types after, e.g., orbitals. Could possibly expand to update all maps.

References base_residue_types_.

Referenced by core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases().

Member Data Documentation

AtomTypeSetCOP core::chemical::ResidueTypeSet::atom_types_
private

Referenced by atom_type_set().

ResidueTypeCOPs core::chemical::ResidueTypeSet::base_residue_types_
private

ResidueTypes that don't have any patches, but can be patched.

The ResidueTypes represented here are also present in the ResidueTypeSetCache

Referenced by add_base_residue_type(), base_residue_types(), force_add_base_residue_type_already_write_locked(), remove_base_residue_type(), and update_base_residue_types_if_replaced().

ResidueTypeSetCacheOP core::chemical::ResidueTypeSet::cache_
private

all cached residue_type information including generated residue_types, name3_map, etc. By making the following an OP (instead of an object) the cache effectively becomes mutable even when in a const ResidueTypeSet. Direct access to the cache_ must never be provided; thread safety relies on the ResidueTypeSet maintaining strict control over its cache

Referenced by cache_object(), generate_residue_type(), has_name(), name_mapOP(), and ResidueTypeSet().

std::map< ResidueTypeCOP , ResidueTypeCOP > core::chemical::ResidueTypeSet::d_to_l_mapping_
private

A list of D-chirality base types with an equivalent L-chirality base type.

For reverse searches.

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

Referenced by d_to_l_mapping(), and get_l_equivalent().

ElementSetCOP core::chemical::ResidueTypeSet::elements_
private

Referenced by element_set().

std::map< ResidueTypeCOP , ResidueTypeCOP > core::chemical::ResidueTypeSet::l_to_d_mapping_
private

A list of L-chirality base types with an equivalent D-chirality base type.

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

Referenced by get_d_equivalent(), and l_to_d_mapping().

MergeBehaviorManagerCOP core::chemical::ResidueTypeSet::merge_behavior_manager_
private
std::map< std::string, MetapatchCOP > core::chemical::ResidueTypeSet::metapatch_map_
private
utility::vector1< MetapatchCOP > core::chemical::ResidueTypeSet::metapatches_
private

Referenced by add_metapatch(), and metapatches().

MMAtomTypeSetCOP core::chemical::ResidueTypeSet::mm_atom_types_
private

Referenced by mm_atom_type_set().

TypeSetMode core::chemical::ResidueTypeSet::mode_
private

What sort of TypeSet is this?

Referenced by add_patches(), atom_type_set(), and mode().

orbitals::OrbitalTypeSetCOP core::chemical::ResidueTypeSet::orbital_types_
private

Referenced by orbital_type_set().

std::map< std::string, utility::vector1< PatchCOP > > core::chemical::ResidueTypeSet::patch_map_
private

patches indexed by name

Referenced by add_patch(), and patch_map().

utility::vector1< PatchCOP > core::chemical::ResidueTypeSet::patches_
private

the patches

Referenced by add_patch(), and patches().

ResidueTypeCOPs core::chemical::ResidueTypeSet::unpatchable_residue_types_
private

ResidueTypes which shouldn't get patches applied to them.

The ResidueTypes represented here are also present in the ResidueTypeSetCache

Referenced by add_unpatchable_residue_type(), remove_unpatchable_residue_type(), and unpatchable_residue_types().


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