![]() |
Rosetta
2021.16
|
A class patching basic ResidueType to create variant types, containing multiple PatchCase. More...
#include <Patch.hh>

Public Member Functions | |
| Patch () | |
| Constructor. More... | |
| Patch (TypeSetMode res_type_set_mode) | |
| Constructor with ResidueTypeSet mode. More... | |
| ~Patch () override | |
| Automatically generated virtual destructor for class deriving directly from VirtualBase. More... | |
| void | read_file (std::string const &filename) |
| constructor from file More... | |
| virtual bool | applies_to (ResidueTypeBase const &rsd) const |
| can I operate on this residue type? More... | |
| virtual bool | replaces (ResidueTypeBase const &rsd) const |
| do I replace this residue type? More... | |
| bool | generates_base_residue_type () const |
| Is this a special patch that expands the list of base residue types? More... | |
| virtual MutableResidueTypeOP | apply (ResidueType const &rsd_type, bool const instantiate=true) const |
| returns patched residue, 0 if patch failed More... | |
| virtual MutableResidueTypeOP | apply (MutableResidueType const &rsd_type, bool const instantiate=true) const |
| returns patched residue, 0 if patch failed More... | |
| virtual std::string const & | name () const |
| unique name of this patch, eg Nter-simple, Cter-full, Phospho, ... ? More... | |
| std::string | patched_name (ResidueTypeBase const &rsd) const |
| Returns the name of the residueType after applying the patch (Theoretical - doesn't actually check if the patch would be applied.) More... | |
| void | set_selector (ResidueTypeSelector const &selector) |
| void | set_name (std::string const &name) |
| virtual utility::vector1 < core::chemical::VariantType > const & | types () const |
| The variant types created by applying this patch. More... | |
| virtual utility::vector1 < std::string > const & | custom_types () const |
| The custom variant types added by this patch. More... | |
| void | types (utility::vector1< core::chemical::VariantType > const &types) |
| Set the variant types created by applying this patch. More... | |
| virtual void | add_type (core::chemical::VariantType const type) |
| Add a VariantType to the list that this patch applies. More... | |
| virtual void | add_custom_type (std::string const &custom_type) |
| Add a custom VariantType to the list that this patch applies. More... | |
| void | replaces_residue_type (bool replaces) |
| utility::vector1< std::string > | adds_atoms (ResidueType const &rsd_in) const |
| returns list of added atom names, useful for identifying patches that go with PDB residues More... | |
| utility::vector1< std::string > | deletes_atoms (ResidueType const &rsd_in) const |
| returns list of deleted atom names, useful for identifying patches that go with PDB residues More... | |
| utility::vector1< std::string > | adds_properties (ResidueType const &rsd_in) const |
| returns list of added property names, useful for identifying patches that go with PDB residues More... | |
| utility::vector1< ResidueProperty > | adds_properties_enums (ResidueType const &rsd_in) const |
| Returns list of added properties, by enum. Useful for identifying patches that go with PDB residues. More... | |
| utility::vector1< std::string > | deletes_properties (ResidueType const &rsd_in) const |
| returns list of deleted property names, useful for identifying patches that go with PDB residues More... | |
| utility::vector1< ResidueProperty > | deletes_properties_enums (ResidueType const &rsd_in) const |
| returns list of deleted property enums, useful for identifying patches that go with PDB residues. More... | |
| utility::vector1< std::string > | deletes_variants (ResidueType const &rsd_in) const |
| returns list of deleted variant names, useful for identifying patches that go with PDB residues More... | |
| utility::vector1 < core::chemical::VariantType > | deletes_variants_by_enum (ResidueType const &rsd_type) const |
| Returns list of deleted VariantTypes. Doesn't support on-the-fly VariantTypes. More... | |
| bool | changes_connections_on (ResidueType const &rsd_in, std::string const &atom) const |
| Does the patch potentially change the connections for the given atom on the ResidueType. More... | |
| void | add_case (PatchCaseOP pcase) |
| Add a patch case to this patch. More... | |
| std::string | generates_new_name3 (ResidueType const &rsd_in) const |
| returns new name3, if changed. Only one new name3 allowed. More... | |
| std::string | generates_interchangeability_group (ResidueType const &rsd_in) const |
| returns new interchangeability_group, if changed. Only one new interchangeability_group allowed. More... | |
| chemical::AA | generates_aa (ResidueType const &rsd_in) const |
| returns new AA, if changed. More... | |
| bool | is_metapatch () const |
| Is this a metapatch? More... | |
Private Attributes | |
| TypeSetMode | res_type_set_mode_ = core::chemical::FULL_ATOM_t |
| private data More... | |
| std::string | name_ = "" |
| name of the patch More... | |
| bool | is_metapatch_ = false |
| Is this a metapatch? More... | |
| utility::vector1 < core::chemical::VariantType > | types_ |
| Variant types created by the patch. More... | |
| utility::vector1< std::string > | custom_types_ |
| Custom variant types created by this patch. More... | |
| ResidueTypeSelector | selector_ |
| criteria to select ResidueTypes to which the patch is applied More... | |
| utility::vector1< PatchCaseOP > | cases_ |
| different cases to which the patch is applied slightly differently, e.g., N-terminus patch to PRO and GLY More... | |
| bool | replaces_residue_type_ = false |
| if set this patch will not change the name of the ResidueType and returns true for replaces() More... | |
| bool | generates_base_residue_type_ = false |
| If true, this patch adds to the list of base residue types. Note that this increases the initializaton cost and base memory footprint of Rosetta! More... | |
A class patching basic ResidueType to create variant types, containing multiple PatchCase.
|
default |
Constructor.
| core::chemical::Patch::Patch | ( | TypeSetMode | res_type_set_mode | ) |
Constructor with ResidueTypeSet mode.
Constructor with ResidueTypeSet name.
|
overridedefault |
Automatically generated virtual destructor for class deriving directly from VirtualBase.
Auto-generated virtual destructor
| void core::chemical::Patch::add_case | ( | PatchCaseOP | pcase | ) |
Add a patch case to this patch.
References cases_, and generates_base_residue_type_.
Referenced by read_file().
|
virtual |
Add a custom VariantType to the list that this patch applies.
References custom_types_.
|
virtual |
Add a VariantType to the list that this patch applies.
References types_.
| utility::vector1< std::string > core::chemical::Patch::adds_atoms | ( | ResidueType const & | rsd_type | ) | const |
returns list of added atom names, useful for identifying patches that go with PDB residues
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any atom_names that are added.
References applies_to(), and cases_.
| utility::vector1< std::string > core::chemical::Patch::adds_properties | ( | ResidueType const & | rsd_type | ) | const |
returns list of added property names, useful for identifying patches that go with PDB residues
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any properties that are added.
References applies_to(), cases_, and update_ResidueType_enum_files::properties.
| utility::vector1< ResidueProperty > core::chemical::Patch::adds_properties_enums | ( | ResidueType const & | rsd_type | ) | const |
Returns list of added properties, by enum. Useful for identifying patches that go with PDB residues.
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any properties that are added, by enum. Faster than string version.
References applies_to(), cases_, and update_ResidueType_enum_files::properties.
|
inlinevirtual |
can I operate on this residue type?
References selector_.
Referenced by adds_atoms(), adds_properties(), adds_properties_enums(), apply(), changes_connections_on(), deletes_atoms(), deletes_properties(), deletes_properties_enums(), deletes_variants(), deletes_variants_by_enum(), generates_aa(), generates_interchangeability_group(), generates_new_name3(), and replaces().
|
virtual |
returns patched residue, 0 if patch failed
Referenced by generates_aa().
|
virtual |
returns patched residue, 0 if patch failed
loop through the cases in this patch and if it is applicable to this ResidueType, the corresponding patch operations are applied to create a new variant type of the basic ResidueType. The new types's name and its variant type info are updated together with all other primary and derived ResidueType data. Finally, call finalize() to update all primary and derived data for the new ResidueType.
References applies_to(), cases_, custom_types_, name(), core::chemical::ResidueTypeBase::name(), name_, patched_name(), replaces_residue_type_, core::chemical::tr(), and types_.
| bool core::chemical::Patch::changes_connections_on | ( | ResidueType const & | rsd_in, |
| std::string const & | atom | ||
| ) | const |
Does the patch potentially change the connections for the given atom on the ResidueType.
References applies_to(), and cases_.
|
inlinevirtual |
The custom variant types added by this patch.
This must be a vector of strings, since the custom types are generated at runtime and can't be enumerated at compile time.
References custom_types_.
| utility::vector1< std::string > core::chemical::Patch::deletes_atoms | ( | ResidueType const & | rsd_type | ) | const |
returns list of deleted atom names, useful for identifying patches that go with PDB residues
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any atom_names that are deleted.
References applies_to(), and cases_.
| utility::vector1< std::string > core::chemical::Patch::deletes_properties | ( | ResidueType const & | rsd_type | ) | const |
returns list of deleted property names, useful for identifying patches that go with PDB residues
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any properties that are deleted.
References applies_to(), cases_, and update_ResidueType_enum_files::properties.
| utility::vector1< ResidueProperty > core::chemical::Patch::deletes_properties_enums | ( | ResidueType const & | rsd_type | ) | const |
returns list of deleted property enums, useful for identifying patches that go with PDB residues.
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any properties that are deleted, by enum. Faster than string version.
References applies_to(), cases_, and update_ResidueType_enum_files::properties.
| utility::vector1< std::string > core::chemical::Patch::deletes_variants | ( | ResidueType const & | rsd_type | ) | const |
returns list of deleted variant names, useful for identifying patches that go with PDB residues
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any variants that are deleted.
References applies_to(), cases_, and update_ResidueType_enum_files::variants.
| utility::vector1< core::chemical::VariantType > core::chemical::Patch::deletes_variants_by_enum | ( | ResidueType const & | rsd_type | ) | const |
Returns list of deleted VariantTypes. Doesn't support on-the-fly VariantTypes.
loop through the cases in this patch and if it is applicable to this ResidueType, compile a list of any variants that are deleted. This version returns a list of VariantType enums (and does not support on-the-fly types).
References applies_to(), cases_, and update_ResidueType_enum_files::variants.
| chemical::AA core::chemical::Patch::generates_aa | ( | ResidueType const & | rsd_type | ) | const |
returns new AA, if changed.
loop through the cases in this patch and if it is applicable to this ResidueType, discover if there is a new name3 generated by the patch.
References protocols::cluster::calibur::aa, core::chemical::ResidueTypeBase::aa(), core::chemical::aa_none, applies_to(), apply(), and cases_.
|
inline |
Is this a special patch that expands the list of base residue types?
References generates_base_residue_type_.
Referenced by patched_name().
| std::string core::chemical::Patch::generates_interchangeability_group | ( | ResidueType const & | rsd_type | ) | const |
returns new interchangeability_group, if changed. Only one new interchangeability_group allowed.
loop through the cases in this patch and if it is applicable to this ResidueType, discover if there is a new interchangeability_group generated by the patch.
References applies_to(), and cases_.
| std::string core::chemical::Patch::generates_new_name3 | ( | ResidueType const & | rsd_type | ) | const |
returns new name3, if changed. Only one new name3 allowed.
loop through the cases in this patch and if it is applicable to this ResidueType, discover if there is a new name3 generated by the patch.
References applies_to(), and cases_.
|
inline |
Is this a metapatch?
References is_metapatch_.
|
inlinevirtual |
unique name of this patch, eg Nter-simple, Cter-full, Phospho, ... ?
References name_.
Referenced by apply(), and set_name().
| std::string core::chemical::Patch::patched_name | ( | ResidueTypeBase const & | rsd | ) | const |
Returns the name of the residueType after applying the patch (Theoretical - doesn't actually check if the patch would be applied.)
References core::chemical::ResidueTypeBase::base_name(), generates_base_residue_type(), core::chemical::ResidueTypeBase::name(), name_, and core::chemical::PATCH_LINKER.
Referenced by apply().
| void core::chemical::Patch::read_file | ( | std::string const & | filename | ) |
constructor from file
References add_case(), core::chemical::ResidueTypeSelector::add_line(), core::chemical::case_from_lines(), cases_, core::chemical::ResidueTypeSelector::clear(), custom_types_, core::chemical::ResidueProperties::get_variant_from_string(), is_metapatch_, name_, replaces_residue_type_, res_type_set_mode_, selector_, protocols::hybridization::t, core::chemical::tag_from_line(), core::chemical::tr(), and types_.
|
inlinevirtual |
do I replace this residue type?
References applies_to(), and replaces_residue_type_.
Referenced by replaces_residue_type().
|
inline |
References replaces(), and replaces_residue_type_.
|
inline |
References is_metapatch_, name(), and name_.
|
inline |
References selector_.
|
inlinevirtual |
The variant types created by applying this patch.
Use custom_types() for a vector of strings of custom types.
References types_.
Referenced by types().
|
inline |
Set the variant types created by applying this patch.
For custom variant types, use the add_custom_type() function, which takes a string.
|
private |
different cases to which the patch is applied slightly differently, e.g., N-terminus patch to PRO and GLY
Referenced by add_case(), adds_atoms(), adds_properties(), adds_properties_enums(), apply(), changes_connections_on(), deletes_atoms(), deletes_properties(), deletes_properties_enums(), deletes_variants(), deletes_variants_by_enum(), generates_aa(), generates_interchangeability_group(), generates_new_name3(), and read_file().
|
private |
Custom variant types created by this patch.
Referenced by add_custom_type(), apply(), custom_types(), and read_file().
|
private |
If true, this patch adds to the list of base residue types. Note that this increases the initializaton cost and base memory footprint of Rosetta!
Referenced by add_case(), and generates_base_residue_type().
|
private |
Is this a metapatch?
Referenced by is_metapatch(), read_file(), and set_name().
|
private |
name of the patch
Referenced by apply(), name(), patched_name(), read_file(), and set_name().
|
private |
if set this patch will not change the name of the ResidueType and returns true for replaces()
Referenced by apply(), read_file(), replaces(), and replaces_residue_type().
|
private |
|
private |
criteria to select ResidueTypes to which the patch is applied
Referenced by applies_to(), read_file(), and set_selector().
|
private |
Variant types created by the patch.
Referenced by add_type(), apply(), read_file(), and types().
1.8.7