ModificationLibrary
Module
viennaptm.modification.modification_library
- class ModificationLibrary(library_path: str | Path = None, metadata_path: str | Path = None, pdbs_minimized: str | Path = None)
Bases:
BaseModelContainer and loader for residue modifications and template structures.
The
ModificationLibraryloads application definitions from a JSON library file and associates them with minimizedBiopython PDB template structure. It provides indexed access to modifications and utilities for loading template residues.- Variables:
modifications (list[Modification]) – List of available residue modifications.
metadata (ModificationLibraryMetadata) – Metadata of the library.
target_templates (dict[str, str]) – Mapping of residue abbreviations to PDB file paths.
- load_residue_from_pdb(target_abbreviation: str) Residue
Load a template residue from a minimized PDB file.
The PDB file must contain exactly one residue whose name matches the requested target abbreviation.
- Parameters:
target_abbreviation (str) – Residue abbreviation to load.
- Returns:
Template residue.
- Return type:
Residue
- Raises:
ValueError – If the PDB file does not contain exactly one matching residue.
- metadata: ModificationLibraryMetadata
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- modifications: List[Modification]
- target_templates: Dict[str, str]
Methods
|
Create a new model by parsing and validating input data from keyword arguments. |
|
|
|
Returns a copy of the model. |
|
|
|
|
|
|
|
Load a template residue from a minimized PDB file. |
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|