Modification
Module
viennaptm.modification.modification_library
- class Modification(*, residue_original_abbreviation: str, residue_modified_abbreviation: str, atom_mapping: Tuple[str | None, str | None]]=<factory>, add_branches: List[AddBranch] = <factory>, metadata: ModificationMetadata = <factory>)
Bases:
BaseModelDefinition of a residue application.
A
Modificationspecifies how an original residue is transformed into a modified residue. It includes atom mappings between the two residue states and one or more application branches that describe how atoms are added and aligned.- Variables:
residue_original_abbreviation (str) – Abbreviation of the original residue.
residue_modified_abbreviation (str) – Abbreviation of the modified residue.
atom_mapping (list[tuple[str | None, str | None]]) – Mapping between original and modified atom names. Each entry is a tuple
(original, modified)where either element may beNoneto indicate deletion or addition.add_branches (list[AddBranch]) – Branches defining how atoms are geometrically added.
Note
Atom deletions and renaming are handled exclusively via
atom_mapping; branches only describe atom additions.- atom_mapping: List[Tuple[str | None, str | None]]
- metadata: ModificationMetadata
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- residue_modified_abbreviation: str
- residue_original_abbreviation: str
Methods
|
Create a new model by parsing and validating input data from keyword arguments. |
|
|
|
Returns a copy of the model. |
|
|
|
|
|
|
|
Creates a new instance of the Model class with validated data. |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
Generates a JSON schema for a model class. |
|
Compute the class name for parametrizations of generic classes. |
|
Override this method to perform additional initialization after __init__ and model_construct. |
|
Try to rebuild the pydantic-core schema for the model. |
|
Validate a pydantic model instance. |
|
!!! abstract "Usage Documentation" |
|
Validate the given object with string data against the Pydantic model. |
|
|
|
|
|
|
|
|
|
|
|
|
|