Skip to content

model

Models of 3D Beacons API HUB.

Generated with

wget https://www.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/v2/openapi.json
uvx --from=datamodel-code-generator datamodel-codegen     --output-model-type dataclasses.dataclass     --enum-field-as-literal all --disable-future-imports     --use-annotated --use-field-description     --openapi-scopes schemas parameters paths --include-path-parameters     --input ./openapi.json --output model.py
When 3D beacons API changes this module should be regenerated and the above command and steps below should be repeated.

After generation changes:

  • ruff format
  • ruff check --fix
  • ruff ignores
  • extract Provider type and search_structure_provider_choices set

Also document UniprotSummary and its children:

  • Use google style docstrings using Attributes: section
  • as mkdocs does not understand docstring per property
  • make llm do it with following prompts:
    Document the children of UniprotSummary and AccessionListRequest.
    If class has attributes with their own docstrings move them to
    the `Attributes:` section of the classes docstring.
    Do not add types in the docstring as they are already defined in the code.
    
    and
    Add docstring to types that do not have any.
    Convert name of type from CamelCase to Camel case as docstring.
    

Provider = Literal['pdbe', 'ped', 'swissmodel', 'alphafold', 'sasbdb', 'alphafill', 'hegelab', 'modelarchive', 'isoformio', 'levylab'] module-attribute

Provider

search_structure_provider_choices = set(get_args(Provider)) module-attribute

All providers

AlignmentDifference = float

Fraction of alignment difference (0 to 1)

AppSequenceSchemaConfidenceType = Literal['pLDDT', 'QMEANDisCo', 'ipTM+pTM']

Confidence type enumeration

AppSequenceSchemaEntityPolyType = Literal['CYCLIC-PSEUDO-PEPTIDE', 'PEPTIDE NUCLEIC ACID', 'POLYDEOXYRIBONUCLEOTIDE', 'POLYDEOXYRIBONUCLEOTIDE/POLYRIBONUCLEOTIDE HYBRID', 'POLYPEPTIDE(D)', 'POLYPEPTIDE(L)', 'POLYRIBONUCLEOTIDE', 'OTHER']

Entity poly type enumeration

AppSequenceSchemaEntityType = Literal['BRANCHED', 'MACROLIDE', 'NON-POLYMER', 'POLYMER', 'WATER']

Entity type enumeration

AppSequenceSchemaExperimentalMethod = Literal['ELECTRON CRYSTALLOGRAPHY', 'ELECTRON MICROSCOPY', 'EPR', 'FIBER DIFFRACTION', 'FLUORESCENCE TRANSFER', 'INFRARED SPECTROSCOPY', 'NEUTRON DIFFRACTION', 'X-RAY POWDER DIFFRACTION', 'SOLID-STATE NMR', 'SOLUTION NMR', 'X-RAY SOLUTION SCATTERING', 'THEORETICAL MODEL', 'X-RAY DIFFRACTION', 'HYBRID']

Experimental method enumeration

AppSequenceSchemaIdentifierCategory = Literal['UNIPROT', 'RFAM', 'CCD', 'SMILES', 'INCHI', 'INCHIKEY']

Identifier category enumeration

AppSequenceSchemaModelCategory = Literal['EXPERIMENTALLY DETERMINED', 'TEMPLATE-BASED', 'AB-INITIO', 'CONFORMATIONAL ENSEMBLE']

Model category enumeration

AppSequenceSchemaModelFormat = Literal['PDB', 'MMCIF', 'BCIF']

Model format enumeration

AppSequenceSchemaModelType = Literal['ATOMIC', 'DUMMY', 'MIX']

Model type enumeration

AppSequenceSchemaOligomericState = Literal['MONOMER', 'HOMODIMER', 'HETERODIMER', 'HOMO-OLIGOMER', 'HETERO-OLIGOMER']

Oligomeric state enumeration

AppUniprotSchemaConfidenceType = Literal['pLDDT', 'QMEANDisCo', 'ipTM+pTM']

App Uniprot Schema Confidence Type

AppUniprotSchemaEntityPolyType = Literal['CYCLIC-PSEUDO-PEPTIDE', 'PEPTIDE NUCLEIC ACID', 'POLYDEOXYRIBONUCLEOTIDE', 'POLYDEOXYRIBONUCLEOTIDE/POLYRIBONUCLEOTIDE HYBRID', 'POLYPEPTIDE(D)', 'POLYPEPTIDE(L)', 'POLYRIBONUCLEOTIDE', 'OTHER']

App Uniprot Schema Entity Poly Type

AppUniprotSchemaEntityType = Literal['BRANCHED', 'MACROLIDE', 'NON-POLYMER', 'POLYMER', 'WATER']

App Uniprot Schema Entity Type

AppUniprotSchemaExperimentalMethod = Literal['ELECTRON CRYSTALLOGRAPHY', 'ELECTRON MICROSCOPY', 'EPR', 'FIBER DIFFRACTION', 'FLUORESCENCE TRANSFER', 'INFRARED SPECTROSCOPY', 'NEUTRON DIFFRACTION', 'X-RAY POWDER DIFFRACTION', 'SOLID-STATE NMR', 'SOLUTION NMR', 'X-RAY SOLUTION SCATTERING', 'THEORETICAL MODEL', 'X-RAY DIFFRACTION', 'HYBRID']

App Uniprot Schema Experimental Method

AppUniprotSchemaIdentifierCategory = Literal['UNIPROT', 'RFAM', 'CCD', 'SMILES', 'INCHI', 'INCHIKEY']

App Uniprot Schema Identifier Category

AppUniprotSchemaModelCategory = Literal['EXPERIMENTALLY DETERMINED', 'TEMPLATE-BASED', 'AB-INITIO', 'CONFORMATIONAL ENSEMBLE']

App Uniprot Schema Model Category

AppUniprotSchemaModelFormat = Literal['PDB', 'MMCIF', 'BCIF']

App Uniprot Schema Model Format

AppUniprotSchemaModelType = Literal['ATOMIC', 'DUMMY', 'MIX']

App Uniprot Schema Model Type

AppUniprotSchemaOligomericState = Literal['MONOMER', 'HOMODIMER', 'HETERODIMER', 'HOMO-OLIGOMER', 'HETERO-OLIGOMER']

App Uniprot Schema Oligomeric State

Chains = list[Chain]

Chains

ChecksumType = Literal['CRC64', 'MD5']

Type of checksum enumeration

EnsembleSampleFormat = Literal['PDB', 'MMCIF', 'BCIF']

Ensemble Sample Format

Evidence = Literal['EXPERIMENTALLY DETERMINED', 'COMPUTATIONAL/PREDICTED', 'FROM LITERATURE']

Evidence

ExperimentalMethod1 = Literal['ELECTRON CRYSTALLOGRAPHY', 'ELECTRON MICROSCOPY', 'EPR', 'FIBER DIFFRACTION', 'FLUORESCENCE TRANSFER', 'INFRARED SPECTROSCOPY', 'NEUTRON DIFFRACTION', 'POWDER DIFFRACTION', 'SOLID-STATE NMR', 'SOLUTION NMR', 'SOLUTION SCATTERING', 'THEORETICAL MODEL', 'X-RAY DIFFRACTION', 'HYBRID']

Experimental Method 1

FeatureType = Literal['CARBOHYD', 'DOMAIN', 'ACT_SITE', 'METAL', 'BINDING', 'NON_STD', 'MOD_RES', 'DISULFID', 'MUTAGEN', 'HELIX', 'STRAND', 'DISORDERED', 'INTERFACE', 'CHANNEL']

Feature Type

HealthResponse = list[HealthStatus]

Response model for /health endpoint - returns array of status objects

HealthStatusEnum = Literal['pass', 'warn', 'fail']

Health status enumeration based on the OpenAPI spec

Resolution = float

Resolution of the model in Angstrom

SequenceIdType = Literal['sequence', 'crc64', 'md5']

Sequence Id Type

SequenceResultGetResponse = list[SearchAccession]

Sequence Result Get Response

UniprotSummaryPostResponse = list[UniprotSummary]

Uniprot Summary Post Response

AccessionListRequest dataclass

Accession list request

Attributes:

Name Type Description
accessions list[str]

A list of UniProt accessions

provider str | None

Name of the model provider

exclude_provider str | None

Provider to exclude.

Annotation dataclass

accession instance-attribute

A UniProt accession

id = None class-attribute instance-attribute

A UniProt identifier

sequence instance-attribute

The sequence of the protein

AnnotationsUniprotQualifierJsonGetParameters dataclass

range = None class-attribute instance-attribute

Specify a UniProt sequence residue range; separated by hyphen(-).

type instance-attribute

Annotation type

uniprot_qualifier instance-attribute

UniProtKB accession number (AC) or entry name (ID)

AppSequenceSchemaEntity dataclass

chain_ids instance-attribute

List of chain identifiers of the molecule

description instance-attribute

Textual label of the molecule

entity_poly_type = None class-attribute instance-attribute

Type of the molecular entity polymer

entity_type instance-attribute

Type of the molecular entity

identifier = None class-attribute instance-attribute

Identifier of the molecule

identifier_category = None class-attribute instance-attribute

Category of the identifier

AppSequenceSchemaSummaryItems dataclass

confidence_avg_local_score = None class-attribute instance-attribute

Average of confidence measures

confidence_type = None class-attribute instance-attribute

Type of confidence measure

confidence_version = None class-attribute instance-attribute

Version of confidence measure software

coverage instance-attribute

Fraction of UniProt sequence covered by the model

created instance-attribute

Date of release of model generation in the format of YYYY-MM-DD

ensemble_sample_format = None class-attribute instance-attribute

File format of the sample coordinates

ensemble_sample_url = None class-attribute instance-attribute

URL of a sample of conformations from ensemble

entities instance-attribute

List of molecular entities in the model

experimental_method = None class-attribute instance-attribute

Experimental method used to determine structure

model_category instance-attribute

Category of the model

model_format instance-attribute

File format of the coordinates

model_identifier instance-attribute

Identifier of the model, such as PDB id

model_page_url = None class-attribute instance-attribute

URL of a web page showing the model

model_type = None class-attribute instance-attribute

Defines if coordinates are atomic-level or contain dummy atoms

model_url instance-attribute

URL of the model coordinates

number_of_conformers = None class-attribute instance-attribute

Number of conformers in a conformational ensemble

oligomeric_state = None class-attribute instance-attribute

Oligomeric state of the model

oligomeric_state_confidence = None class-attribute instance-attribute

Confidence in oligomeric state

preferred_assembly_id = None class-attribute instance-attribute

Identifier of preferred assembly

provider instance-attribute

Name of the model provider

resolution = None class-attribute instance-attribute

Resolution of the model in Angstrom

sequence_identity instance-attribute

Sequence identity of model to UniProt sequence

AppUniprotSchemaEntity dataclass

Molecular entity in a UniProt structure model.

Attributes:

Name Type Description
entity_type AppUniprotSchemaEntityType

Type of the molecular entity; similar to _entity.type in mmCIF.

description str

Textual label of the molecule.

chain_ids list[str]

List of label_asym identifiers (chain_id in PDB format) for the molecule.

entity_poly_type AppUniprotSchemaEntityPolyType | None

Type of the molecular entity polymer; similar to _entity_poly.type in mmCIF.

identifier str | None

Identifier of the molecule.

identifier_category AppUniprotSchemaIdentifierCategory | None

Category of the identifier.

AppUniprotSchemaSummaryItems dataclass

Summary information for a UniProt-associated structure model.

Attributes:

Name Type Description
model_identifier str

Identifier of the model, such as PDB ID.

model_category AppUniprotSchemaModelCategory

Category of the model.

model_url str

URL of the model coordinates.

model_format AppUniprotSchemaModelFormat

File format of the coordinates.

provider str

Name of the model provider.

created str

Date of model release in YYYY-MM-DD format.

sequence_identity float

Sequence identity of the model to the UniProt sequence in range [0, 1].

uniprot_start int

1-indexed first residue of the model in UniProt numbering.

uniprot_end int

1-indexed last residue of the model in UniProt numbering.

coverage float

Fraction of UniProt sequence covered by the model in range [0, 1].

entities list[AppUniprotSchemaEntity]

List of molecular entities in the model.

model_type AppUniprotSchemaModelType | None

Whether coordinates are atomic, dummy atoms, or mixed.

model_page_url str | None

Provider web page URL for the model.

number_of_conformers float | None

Number of conformers in a conformational ensemble.

ensemble_sample_url str | None

URL of a sample of conformations from an ensemble.

ensemble_sample_format EnsembleSampleFormat | None

File format of the sample coordinates.

experimental_method AppUniprotSchemaExperimentalMethod | None

Experimental method used to determine the structure.

resolution float | None

Resolution of the model in Angstrom.

confidence_type AppUniprotSchemaConfidenceType | None

Type of confidence measure.

confidence_version str | None

Version of the confidence measure software.

confidence_avg_local_score float | None

Average confidence score.

oligomeric_state AppUniprotSchemaOligomericState | None

Oligomeric state of the model.

oligomeric_state_confidence float | None

Confidence in the oligomeric state assignment.

preferred_assembly_id str | None

Identifier of the preferred assembly in the model.

EnsemblSummary dataclass

ensembl_id instance-attribute

An Ensembl identifier

species instance-attribute

Species name

taxid instance-attribute

Taxonomy identifier

EnsemblSummaryQualifierJsonGetParameters dataclass

qualifier instance-attribute

Ensembl identifier.

EnsemblTranscript dataclass

alignment_difference = None class-attribute instance-attribute

Fraction of alignment difference (0 to 1)

seqRegionEnd instance-attribute

End position of the transcript

seqRegionStart instance-attribute

Start position of the transcript

transcript_id instance-attribute

Transcript identifier

Entry dataclass

checksum instance-attribute

CRC64 or MD5 checksum of the sequence

checksum_type instance-attribute

Type of the checksum

sequence instance-attribute

The protein sequence

FeatureItem dataclass

description instance-attribute

Description/Label of the annotation

evidence = None class-attribute instance-attribute

Evidence category of the annotation

residues = None class-attribute instance-attribute

An array of residue indices

source_name = None class-attribute instance-attribute

Name of the source of the annotations, i.e. where is the data from

source_url = None class-attribute instance-attribute

URL of the source of the annotation, i.e. where to find more data

type instance-attribute

Type of the annotation

HealthStatus dataclass

beacons_api_version instance-attribute

The version of the 3DBeacons API

output = None class-attribute instance-attribute

Raw error output, in case of 'fail' or 'warn' states

service_id instance-attribute

The identifier of the service, corresponds to the provider ID in the registry

status instance-attribute

The status of the service

Overview dataclass

Overview of a UniProt-associated structure.

Attributes:

Name Type Description
summary AppUniprotSchemaSummaryItems

Summary information for the structure.

Region dataclass

annotation_value = None class-attribute instance-attribute

The value of the annotation

end instance-attribute

The last position of the annotation

start instance-attribute

The first position of the annotation

unit = None class-attribute instance-attribute

The unit of the annotation value, if applicable

Residue dataclass

confidence = None class-attribute instance-attribute

Confidence score in the range of [0,1]

model_residue_label instance-attribute

Model residue index

uniprot_residue_number instance-attribute

UniProt residue index

Segment dataclass

seqres instance-attribute

Information on the sequence of the model

templates = None class-attribute instance-attribute

Information on the template(s) used for the model

Seqres dataclass

aligned_sequence instance-attribute

Sequence of the model

from_ instance-attribute

1-indexed first residue

to instance-attribute

1-indexed last residue

SequenceOverview dataclass

summary instance-attribute

Summary information for the structure

SequenceSummary dataclass

entry instance-attribute

Entry information including sequence and checksum

structures instance-attribute

List of available structures

SequenceSummaryGetParameters dataclass

id instance-attribute

Identifier for the type specified in the type parameter

type = 'sequence' class-attribute instance-attribute

Type of the identifier

Template dataclass

chain_id instance-attribute

Identifier of the chain of the template; this is label_asym_id in mmCIF

experimental_method instance-attribute

Experimental method used to determine the template

last_updated instance-attribute

Date of release of the last update in the format of YYYY-MM-DD

preferred_assembly_id = None class-attribute instance-attribute

Identifier of the preferred assembly of the template

provider instance-attribute

Provider of the template

resolution instance-attribute

Resolution of the template, in Angstrom

template_id instance-attribute

Identifier of the template

template_sequence_identity instance-attribute

Sequence identity of the template with the UniProt accession, in the range of [0,1]

Uniprot dataclass

aligned_sequence instance-attribute

Sequence of the UniProt accession

from_ instance-attribute

1-indexed first residue

to instance-attribute

1-indexed last residue

UniprotEntry dataclass

UniProt entry

Attributes:

Name Type Description
ac str

UniProt accession.

id str | None

UniProt identifier.

uniprot_checksum str | None

CRC64 checksum of the UniProt sequence.

sequence_length int | None

Length of the UniProt sequence.

segment_start int | None

1-indexed first residue of the UniProt sequence segment.

segment_end int | None

1-indexed last residue of the UniProt sequence segment.

description str | None

Description of the UniProt entry.

UniprotQualifierJsonGetParameters dataclass

qualifier instance-attribute

UniProtKB accession number (AC), entry name (ID) or CRC64 checksum of the UniProt sequence

range = None class-attribute instance-attribute

Specify a UniProt sequence residue range

template = None class-attribute instance-attribute

Template is 4 letter PDB code, or 4 letter code with assembly ID and chain for SMTL entries

uniprot_checksum = None class-attribute instance-attribute

CRC64 checksum of the UniProt sequence

UniprotSummary dataclass

Uniprot summary

Attributes:

Name Type Description
uniprot_entry UniprotEntry | None

Uniprot entry

structures list[Overview] | None

Structures

UniprotSummaryQualifierJsonGetParameters dataclass

exclude_provider = None class-attribute instance-attribute

Provider to exclude.

qualifier instance-attribute

UniProtKB accession number (AC), entry name (ID) or CRC64 checksum of the UniProt sequence

range = None class-attribute instance-attribute

Specify a UniProt sequence residue range

template = None class-attribute instance-attribute

Template is 4 letter PDB code, or 4 letter code with assembly ID and chain for SMTL entries

uniprot_checksum = None class-attribute instance-attribute

CRC64 checksum of the UniProt sequence