Rosetta
|
An abstract interface to a set of ResidueTypes. More...
#include <ResidueTypeSet.hh>
Public Member Functions | |
ResidueTypeSet (TypeSetMode mode=INVALID_t) | |
default c-tor More... | |
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... | |
io::MergeAndSplitBehaviorManager const & | merge_split_behavior_manager () const |
accessor for merge/split 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 utility::vector1< PatchCOP > | get_patches (std::string const &name) const |
Get the patches corresponding to a patch name. Will get both regular an metapatches. More... | |
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... | |
virtual utility::vector1< PatchCOP > | get_patches (std::string const &name, std::map< std::string, utility::vector1< PatchCOP > > const &patch_mapping, std::map< std::string, MetapatchCOP > const &metapach_mapping) const |
Get the patches corresponding to a patch name. Will get both regular an metapatches This version takes in patch and metapach lists, to allow for subclass subsetting. 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 |
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_split_behavior_manager (io::MergeAndSplitBehaviorManagerCOP 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 &) | |
ResidueTypeSet & | operator= (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... | |
io::MergeAndSplitBehaviorManagerCOP | merge_split_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< PatchCOP > | patches_ |
the patches More... | |
utility::vector1< MetapatchCOP > | metapatches_ |
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... | |
An abstract interface to a set of ResidueTypes.
core::chemical::ResidueTypeSet::ResidueTypeSet | ( | TypeSetMode | mode = INVALID_t | ) |
default c-tor
|
protected |
References cache_.
|
protectedvirtual |
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.
Reimplemented in core::chemical::PoseResidueTypeSet.
References base_residue_types_, cache_object(), core::chemical::ResidueType::make(), mode(), prep_restype(), and core::chemical::TR().
Referenced by core::chemical::PoseResidueTypeSet::add_base_residue_type(), add_base_residue_type(), core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_database(), core::chemical::GlobalResidueTypeSet::load_residue_types_from_sql_database(), and read_files_for_base_residue_types().
|
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(), protocols::abinitio::filename(), mm_atom_type_set(), orbital_type_set(), and core::chemical::read_topology_file().
|
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().
|
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().
|
protectedvirtual |
Reimplemented in core::chemical::PoseResidueTypeSet.
References add_metapatch(), add_patch(), cache_object(), protocols::abinitio::filename(), and mode_.
Referenced by core::chemical::PoseResidueTypeSet::add_patches(), core::chemical::GlobalResidueTypeSet::init_patches_from_commandline(), and core::chemical::GlobalResidueTypeSet::init_patches_from_database().
|
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().
|
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(), protocols::abinitio::filename(), mm_atom_type_set(), orbital_type_set(), and core::chemical::read_topology_file().
|
protected |
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 get_patches(), mode(), prep_restype(), and core::chemical::TR().
Referenced by core::chemical::PoseResidueTypeSet::generate_residue_type_write_locked(), and generate_residue_type_write_locked().
|
inline |
References atom_types_.
Referenced by add_base_residue_type(), add_unpatchable_residue_type(), core::chemical::PoseResidueTypeSet::atom_type_set(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_database(), and core::chemical::GlobalResidueTypeSet::load_residue_types_from_sql_database().
|
protected |
References atom_types_, core::chemical::INVALID_t, mode(), mode_, and core::chemical::TR().
|
inlinevirtual |
The list of ResidueTypes that don't have any patches, but can be patched.
Reimplemented in core::chemical::PoseResidueTypeSet.
References base_residue_types_.
Referenced by core::chemical::PoseResidueTypeSet::base_residue_types(), core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases(), core::chemical::ResidueTypeFinder::get_possible_base_residue_types(), core::chemical::GlobalResidueTypeSet::GlobalResidueTypeSet(), core::chemical::ResidueTypeFinder::initialize_relevant_pdb_components(), core::chemical::GlobalResidueTypeSet::place_adducts(), and core::chemical::ResidueTypeSetCache::regenerate_cached_maps().
|
inlineprotected |
The alterable cache object.
Mind whether or not a write/read lock has been obtained by the template method wherein this accessor is invoked. Either a read lock or a write lock on the RTSC must have been obtained to call this function, but if one has already been obtained and you try to create another, then you will deadlock.
References cache_.
Referenced by add_base_residue_type(), add_patches(), add_unpatchable_residue_type(), core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases(), core::chemical::PoseResidueTypeSet::default_rts(), force_add_base_residue_type_already_write_locked(), generate_residue_type(), core::chemical::PoseResidueTypeSet::generate_residue_type_write_locked(), generate_residue_type_write_locked(), generates_patched_residue_type_with_interchangeability_group(), generates_patched_residue_type_with_name3(), get_all_types_with_variants_aa(), get_all_types_with_variants_by_basetype(), has_name(), has_name_write_locked(), core::chemical::GlobalResidueTypeSet::lazy_load_base_type_already_write_locked(), core::chemical::PoseResidueTypeSet::lazy_load_base_type_already_write_locked(), core::chemical::GlobalResidueTypeSet::load_pdb_component(), name_mapOP(), remove_base_residue_type(), and remove_unpatchable_residue_type().
|
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().
|
inline |
References elements_.
Referenced by add_base_residue_type(), add_unpatchable_residue_type(), core::chemical::PoseResidueTypeSet::element_set(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_database(), and core::chemical::GlobalResidueTypeSet::load_residue_types_from_sql_database().
|
inlineprotected |
References elements_.
|
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().
|
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.
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().
|
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().
|
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().
|
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::fixes_interchangeability_group(), and core::chemical::PoseResidueTypeSet::generates_patched_residue_type_with_interchangeability_group().
|
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::fixes_name3(), core::chemical::PoseResidueTypeSet::generates_patched_residue_type_with_name3(), and core::chemical::ResidueTypeFinder::initialize_relevant_pdb_components().
|
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.
References protocols::cluster::calibur::aa, and update_ResidueType_enum_files::variants.
Referenced by core::chemical::GlobalResidueTypeSet::get_all_types_with_variants_aa().
|
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.
References core::chemical::ResidueTypeFinder::aa(), protocols::cluster::calibur::aa, cache_object(), core::chemical::ResidueTypeFinder::get_all_possible_residue_types(), core::chemical::ResidueTypeFinder::variant_exceptions(), update_ResidueType_enum_files::variants, 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.
[in] | base_type | A ResidueTypeCOP to a base residue type, used for looking up the variant. |
[in] | variants | A list of VariantTypes that the returned ResidueTypes must have, used for looking up the variant. |
[in] | variant_strings | A list of custom VariantTypes (that don't have enums) that the returned ResidueTypes must have, used for looking up the variant. |
[in] | exceptions | A list of VariantTypes that are ignored in matching. |
[in] | no_metapatches | If true, metapatches are ignored. |
[in] | base_type | A ResidueTypeCOP to a base residue type, used for looking up the variant. |
[in] | variants | A list of VariantTypes that the returned ResidueTypes must have; used for looking up the variant. |
[in] | variant_strings | A list of custom VariantTypes (that don't have enums) that the returned ResidueTypes must have, used for looking up the variant. |
[in] | exceptions | A list of VariantTypes that are ignored in matching. |
[in] | no_metapatches | If true, metapatches are ignored. |
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(), update_ResidueType_enum_files::variants, 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(), update_ResidueType_enum_files::variants, 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(), update_ResidueType_enum_files::variants, 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(), protocols::cluster::calibur::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().
|
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.
Returns NULL if there is no equivalent, true otherwise. Throws an error if this is not a D-residue. Preserves variant types.
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().
|
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.
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().
|
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().
|
virtual |
Get the patches corresponding to a patch name. Will get both regular an metapatches.
References metapatch_map(), and patch_map().
Referenced by apply_patch().
|
protectedvirtual |
Get the patches corresponding to a patch name. Will get both regular an metapatches This version takes in patch and metapach lists, to allow for subclass subsetting.
This should not touch any mutex-protected data.
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 protocols::cluster::calibur::aa, get_representative_type_aa(), and update_ResidueType_enum_files::variants.
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(), protocols::cluster::calibur::aa, core::chemical::ResidueTypeFinder::get_representative_type(), update_ResidueType_enum_files::variants, 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_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 protocols::vip::base_name(), core::chemical::ResidueTypeFinder::get_representative_type(), and core::chemical::ResidueTypeFinder::residue_base_name().
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_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(), update_ResidueType_enum_files::variants, and core::chemical::ResidueTypeFinder::variants().
Referenced by get_representative_type_name1().
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.
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(), update_ResidueType_enum_files::variants, 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().
ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_custom_variant_added | ( | ResidueType const & | init_rsd, |
std::string const & | new_type | ||
) | const |
References protocols::vip::base_name(), core::chemical::ResidueTypeFinder::base_type(), core::chemical::ResidueProperties::get_list_of_custom_variants(), core::chemical::ResidueTypeFinder::get_representative_type(), core::chemical::ResidueType::get_self_ptr(), core::chemical::ResidueProperties::has_custom_variant_types(), core::chemical::ResidueTypeBase::has_variant_type(), core::chemical::ResidueTypeBase::name(), core::chemical::ResidueTypeBase::properties(), core::chemical::ResidueTypeFinder::residue_base_name(), core::chemical::residue_type_base_name(), core::chemical::ResidueTypeBase::variant_type_enums(), and core::chemical::ResidueTypeFinder::variants().
ResidueType const & core::chemical::ResidueTypeSet::get_residue_type_with_variant_added | ( | ResidueType const & | init_rsd, |
std::string const & | new_type | ||
) | const |
References protocols::vip::base_name(), core::chemical::ResidueTypeFinder::base_type(), core::chemical::ResidueProperties::get_list_of_variants(), core::chemical::ResidueTypeFinder::get_representative_type(), core::chemical::ResidueType::get_self_ptr(), core::chemical::ResidueTypeBase::has_variant_type(), core::chemical::ResidueTypeBase::name(), core::chemical::ResidueTypeBase::properties(), core::chemical::ResidueTypeFinder::residue_base_name(), core::chemical::residue_type_base_name(), and core::chemical::ResidueTypeFinder::variants().
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.
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_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.
References core::chemical::ResidueTypeBase::base_name(), protocols::vip::base_name(), core::chemical::ResidueTypeFinder::base_type(), core::chemical::ResidueType::get_base_type_cop(), core::chemical::ResidueProperties::get_list_of_variants(), core::chemical::ResidueTypeFinder::get_representative_type(), core::chemical::ResidueType::get_self_ptr(), core::chemical::ResidueProperties::get_string_from_variant(), core::chemical::ResidueTypeBase::has_variant_type(), core::chemical::ResidueTypeBase::name(), core::chemical::ResidueTypeBase::properties(), core::chemical::ResidueTypeFinder::residue_base_name(), and core::chemical::ResidueTypeFinder::variants().
Referenced by core::pose::make_pose_from_saccharide_sequence(), and protocols::environment::rm_variant().
|
inline |
|
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().
|
inlinevirtual |
Do we have this metapatch?
Reimplemented in core::chemical::PoseResidueTypeSet.
References metapatch_map_.
Referenced by metapatch().
|
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::io::pose_from_sfr::find_restype(), 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().
|
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().
|
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().
|
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().
io::MergeAndSplitBehaviorManager const & core::chemical::ResidueTypeSet::merge_split_behavior_manager | ( | ) | const |
accessor for merge/split behavior manager
References merge_split_behavior_manager_.
|
inlinevirtual |
Reimplemented in core::chemical::PoseResidueTypeSet.
References has_metapatch(), and metapatch_map_.
|
inlinevirtual |
the metapatches, index by name.
Reimplemented in core::chemical::PoseResidueTypeSet.
References metapatch_map_.
Referenced by core::chemical::PoseResidueTypeSet::generate_residue_type_write_locked(), generate_residue_type_write_locked(), and get_patches().
|
inlinevirtual |
the metapatches
Reimplemented in core::chemical::PoseResidueTypeSet.
References metapatches_.
Referenced by core::chemical::PoseResidueTypeSet::default_rts(), core::chemical::ResidueTypeFinder::get_singly_metapatched_types(), and core::chemical::PoseResidueTypeSet::metapatches().
|
inline |
References mm_atom_types_.
Referenced by add_base_residue_type(), add_unpatchable_residue_type(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_database(), core::chemical::GlobalResidueTypeSet::load_residue_types_from_sql_database(), and core::chemical::PoseResidueTypeSet::mm_atom_type_set().
|
inlineprotected |
References mm_atom_types_.
|
inline |
The type of the ResidueTypeSet.
The difference between a ResidueTypeSet name and a ResidueTypeSet mode is that a a ResidueTypeSet name should uniquely identify a ResidueTypeSet (at lease those within the ChemicalManger) but more than one ResidueTypeSet may have the same mode. The mode specifies what compatibility class (full atom, centroid) the ResidueTypeSet has.
References mode_.
Referenced by add_base_residue_type(), add_unpatchable_residue_type(), apply_patch(), atom_type_set(), core::chemical::GlobalResidueTypeSet::attempt_readin(), core::import_pose::build_pose_as_is2(), force_add_base_residue_type_already_write_locked(), core::chemical::GlobalResidueTypeSet::init_patches_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_database(), core::chemical::GlobalResidueTypeSet::load_residue_types_from_sql_database(), core::chemical::GlobalResidueTypeSet::params_files_from_commandline(), core::import_pose::pose_from_file(), core::chemical::PoseResidueTypeSet::PoseResidueTypeSet(), core::pack::palette::PackerPalette::set_up_default_base_types(), core::util::switch_to_centroid_rot_set(), and core::util::switch_to_residue_type_set().
|
inlineprotected |
References mode_.
|
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().
|
virtual |
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.
MOST RESIDUE TYPES WILL BE GENERATED THROUGH THIS FUNCTION.
References cache_, cache_object(), core::chemical::fixup_patches(), and name_mapOP_write_locked().
Referenced by core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases(), core::io::pose_from_sfr::find_restype(), core::chemical::ResidueTypeFinder::get_patched_types(), core::chemical::ResidueTypeFinder::get_singly_metapatched_types(), core::chemical::ResidueTypeFinder::initialize_relevant_pdb_components(), name_map(), core::pose::residue_types_from_saccharide_sequence_recursive(), core::pose::residue_types_from_sequence(), and core::util::switch_to_residue_type_set().
|
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().
|
protecteddelete |
|
inline |
References orbital_types_.
Referenced by add_base_residue_type(), add_unpatchable_residue_type(), core::chemical::GlobalResidueTypeSet::init_restypes_from_commandline(), core::chemical::GlobalResidueTypeSet::init_restypes_from_database(), core::chemical::GlobalResidueTypeSet::load_residue_types_from_sql_database(), core::chemical::PoseResidueTypeSet::orbital_type_set(), and prep_restype().
|
inlineprotected |
References orbital_types_.
|
inlinevirtual |
the patches, index by name.
Reimplemented in core::chemical::PoseResidueTypeSet.
References patch_map_.
Referenced by core::chemical::PoseResidueTypeSet::generate_residue_type_write_locked(), generate_residue_type_write_locked(), and get_patches().
|
inlinevirtual |
the patches
Reimplemented in core::chemical::PoseResidueTypeSet.
References patches_.
Referenced by core::chemical::GlobalResidueTypeSet::deal_with_patch_special_cases(), core::chemical::PoseResidueTypeSet::default_rts(), core::chemical::ResidueTypeFinder::get_patched_types(), core::chemical::PoseResidueTypeSet::patches(), and core::chemical::ResidueTypeSetCache::regenerate_cached_maps().
|
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().
|
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().
|
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().
|
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::PoseResidueTypeSet, and core::chemical::GlobalResidueTypeSet.
References base_residue_types_, cache_object(), has_name(), and name_map().
Referenced by core::chemical::PoseResidueTypeSet::remove_base_residue_type().
|
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::PoseResidueTypeSet, and core::chemical::GlobalResidueTypeSet.
References cache_object(), has_name(), name_map(), and unpatchable_residue_types_.
Referenced by core::chemical::PoseResidueTypeSet::remove_unpatchable_residue_type().
|
protectedvirtual |
Reimplemented in core::chemical::PoseResidueTypeSet.
References merge_split_behavior_manager_.
Referenced by core::chemical::GlobalResidueTypeSet::GlobalResidueTypeSet(), and core::chemical::PoseResidueTypeSet::set_merge_split_behavior_manager().
|
inlinevirtual |
The list of ResidueTypes which shouldn't get patches applied to them.
Reimplemented in core::chemical::PoseResidueTypeSet.
References unpatchable_residue_types_.
Referenced by core::chemical::ResidueTypeFinder::get_possible_base_unpatchable_residue_types(), core::chemical::ResidueTypeFinder::get_possible_unpatchable_residue_types(), core::chemical::GlobalResidueTypeSet::GlobalResidueTypeSet(), and core::chemical::PoseResidueTypeSet::unpatchable_residue_types().
|
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().
|
private |
Referenced by atom_type_set().
|
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().
|
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().
|
private |
A list of D-chirality base types with an equivalent L-chirality base type.
For reverse searches.
Referenced by d_to_l_mapping(), and get_l_equivalent().
|
private |
Referenced by element_set().
|
private |
A list of L-chirality base types with an equivalent D-chirality base type.
Referenced by get_d_equivalent(), and l_to_d_mapping().
|
private |
Referenced by merge_split_behavior_manager(), and set_merge_split_behavior_manager().
|
private |
Referenced by add_metapatch(), has_metapatch(), metapatch(), and metapatch_map().
|
private |
Referenced by add_metapatch(), and metapatches().
|
private |
Referenced by mm_atom_type_set().
|
private |
What sort of TypeSet is this?
Referenced by add_patches(), atom_type_set(), and mode().
|
private |
Referenced by orbital_type_set().
|
private |
patches indexed by name
Referenced by add_patch(), and patch_map().
|
private |
the patches
Referenced by add_patch(), and patches().
|
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().