Skip to content
Snippets Groups Projects
Commit 75e1dac4 authored by Alexander Rose's avatar Alexander Rose
Browse files

mmcif, ccd & bird schema updates

parent 151ef5d8
No related branches found
No related tags found
No related merge requests found
/**
* Copyright (c) 2017-2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* Code-generated 'BIRD' schema file
*
* @author mol-star package (src/apps/schema-generator/generate)
*/
import { Database, Column } from 'mol-data/db'
import Schema = Column.Schema
const str = Schema.str;
const int = Schema.int;
const float = Schema.float;
// const coord = Schema.coord;
const Aliased = Schema.Aliased;
// const Matrix = Schema.Matrix;
// const Vector = Schema.Vector;
// const List = Schema.List;
export const BIRD_Schema = {
pdbx_reference_molecule: {
prd_id: str,
formula_weight: float,
formula: str,
type: Aliased<'Amino acid' | 'Aminoglycoside' | 'Anthracycline' | 'Anthraquinone' | 'Ansamycin' | 'Chalkophore' | 'Chromophore' | 'Glycopeptide' | 'Cyclic depsipeptide' | 'Cyclic lipopeptide' | 'Cyclic peptide' | 'Heterocyclic' | 'Imino sugar' | 'Keto acid' | 'Lipoglycopeptide' | 'Lipopeptide' | 'Macrolide' | 'Non-polymer' | 'Nucleoside' | 'Oligopeptide' | 'Oligosaccharide' | 'Peptaibol' | 'Peptide-like' | 'Polycyclic' | 'Polypeptide' | 'Polysaccharide' | 'Quinolone' | 'Thiolactone' | 'Thiopeptide' | 'Siderophore' | 'Unknown' | 'Chalkophore, Polypeptide'>(str),
type_evidence_code: str,
class: Aliased<'Antagonist' | 'Antibiotic' | 'Anticancer' | 'Anticoagulant' | 'Antifungal' | 'Antiinflammatory' | 'Antimicrobial' | 'Antineoplastic' | 'Antiparasitic' | 'Antiretroviral' | 'Anthelmintic' | 'Antithrombotic' | 'Antitumor' | 'Antiviral' | 'CASPASE inhibitor' | 'Chaperone binding' | 'Enzyme inhibitor' | 'Growth factor' | 'Immunosuppressant' | 'Inhibitor' | 'Lantibiotic' | 'Metabolism' | 'Metal transport' | 'Oxidation-reduction' | 'Receptor' | 'Thrombin inhibitor' | 'Trypsin inhibitor' | 'Toxin' | 'Unknown' | 'Anticoagulant, Antithrombotic' | 'Antibiotic, Antimicrobial' |'Antibiotic, Anthelmintic' | 'Antibiotic, Antineoplastic' | 'Antimicrobial, Antiretroviral' | 'Antimicrobial, Antitumor' | 'Antimicrobial, Antiparasitic, Antibiotic' | 'Thrombin inhibitor, Trypsin inhibitor'>(str),
class_evidence_code: str,
name: str,
represent_as: Aliased<'polymer' | 'single molecule'>(str),
chem_comp_id: str,
description: str,
representative_PDB_id_code: str,
release_status: Aliased<'REL' | 'HOLD' | 'OBS' | 'WAIT'>(str),
replaces: str,
replaced_by: str,
},
pdbx_reference_entity_list: {
prd_id: str,
ref_entity_id: str,
type: str,
details: str,
component_id: int,
},
pdbx_reference_entity_nonpoly: {
prd_id: str,
ref_entity_id: str,
name: str,
chem_comp_id: str,
},
pdbx_reference_entity_link: {
link_id: int,
prd_id: str,
details: str,
ref_entity_id_1: str,
ref_entity_id_2: str,
entity_seq_num_1: int,
entity_seq_num_2: int,
comp_id_1: str,
comp_id_2: str,
atom_id_1: str,
atom_id_2: str,
value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(str),
component_1: int,
component_2: int,
link_class: Aliased<'PP' | 'PN' | 'NP' | 'NN'>(str),
},
pdbx_reference_entity_poly_link: {
link_id: int,
prd_id: str,
ref_entity_id: str,
component_id: int,
entity_seq_num_1: int,
entity_seq_num_2: int,
comp_id_1: str,
comp_id_2: str,
atom_id_1: str,
atom_id_2: str,
value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(str),
},
pdbx_reference_entity_poly: {
prd_id: str,
ref_entity_id: str,
type: Aliased<'peptide-like' | 'nucleic-acid-like' | 'polysaccharide-like'>(str),
db_code: str,
db_name: str,
},
pdbx_reference_entity_poly_seq: {
prd_id: str,
ref_entity_id: str,
mon_id: str,
parent_mon_id: str,
num: int,
observed: Aliased<'Y' | 'N'>(str),
hetero: Aliased<'Y' | 'N'>(str),
},
pdbx_reference_entity_sequence: {
prd_id: str,
ref_entity_id: str,
type: str,
NRP_flag: Aliased<'Y' | 'N'>(str),
one_letter_codes: str,
},
pdbx_reference_entity_src_nat: {
prd_id: str,
ref_entity_id: str,
ordinal: int,
organism_scientific: str,
taxid: str,
db_code: str,
db_name: str,
},
pdbx_prd_audit: {
prd_id: str,
date: str,
processing_site: str,
action_type: Aliased<'Initial release' | 'Create molecule' | 'Modify type' | 'Modify class' | 'Modify molecule name' | 'Modify representation' | 'Modify sequence' | 'Modify linkage' | 'Modify taxonomy organism' | 'Modify audit' | 'Other modification' | 'Obsolete molecule'>(str),
},
}
export type BIRD_Schema = typeof BIRD_Schema;
export interface BIRD_Database extends Database<BIRD_Schema> { }
\ No newline at end of file
...@@ -18,17 +18,18 @@ const coord = Schema.coord; ...@@ -18,17 +18,18 @@ const coord = Schema.coord;
const Aliased = Schema.Aliased; const Aliased = Schema.Aliased;
// const Matrix = Schema.Matrix; // const Matrix = Schema.Matrix;
// const Vector = Schema.Vector; // const Vector = Schema.Vector;
const List = Schema.List;
export const CCD_Schema = { export const CCD_Schema = {
chem_comp: { chem_comp: {
formula: str, formula: str,
formula_weight: float, formula_weight: float,
id: str, id: str,
mon_nstd_parent_comp_id: str, mon_nstd_parent_comp_id: List(',', x => x),
name: str, name: str,
one_letter_code: str, one_letter_code: str,
three_letter_code: str, three_letter_code: str,
type: str, type: Aliased<'D-peptide linking' | 'L-peptide linking' | 'D-peptide NH3 amino terminus' | 'L-peptide NH3 amino terminus' | 'D-peptide COOH carboxy terminus' | 'L-peptide COOH carboxy terminus' | 'DNA linking' | 'RNA linking' | 'L-RNA linking' | 'L-DNA linking' | 'DNA OH 5 prime terminus' | 'RNA OH 5 prime terminus' | 'DNA OH 3 prime terminus' | 'RNA OH 3 prime terminus' | 'D-saccharide 1,4 and 1,4 linking' | 'L-saccharide 1,4 and 1,4 linking' | 'D-saccharide 1,4 and 1,6 linking' | 'L-saccharide 1,4 and 1,6 linking' | 'L-saccharide' | 'D-saccharide' | 'saccharide' | 'non-polymer' | 'peptide linking' | 'peptide-like' | 'L-gamma-peptide, C-delta linking' | 'D-gamma-peptide, C-delta linking' | 'L-beta-peptide, C-gamma linking' | 'D-beta-peptide, C-gamma linking' | 'other'>(str),
pdbx_synonyms: str, pdbx_synonyms: str,
pdbx_type: str, pdbx_type: str,
pdbx_ambiguous_flag: str, pdbx_ambiguous_flag: str,
...@@ -42,7 +43,7 @@ export const CCD_Schema = { ...@@ -42,7 +43,7 @@ export const CCD_Schema = {
pdbx_model_coordinates_missing_flag: Aliased<'Y' | 'N'>(str), pdbx_model_coordinates_missing_flag: Aliased<'Y' | 'N'>(str),
pdbx_initial_date: str, pdbx_initial_date: str,
pdbx_modified_date: str, pdbx_modified_date: str,
pdbx_processing_site: str, pdbx_processing_site: Aliased<'PDBE' | 'EBI' | 'PDBJ' | 'RCSB'>(str),
}, },
chem_comp_atom: { chem_comp_atom: {
alt_atom_id: str, alt_atom_id: str,
...@@ -74,14 +75,14 @@ export const CCD_Schema = { ...@@ -74,14 +75,14 @@ export const CCD_Schema = {
pdbx_chem_comp_descriptor: { pdbx_chem_comp_descriptor: {
comp_id: str, comp_id: str,
descriptor: str, descriptor: str,
type: str, type: Aliased<'SMILES_CANNONICAL' | 'SMILES_CANONICAL' | 'SMILES' | 'SMILES' | 'InChI' | 'InChI_MAIN' | 'InChI_MAIN_FORMULA' | 'InChI_MAIN_CONNECT' | 'InChI_MAIN_HATOM' | 'InChI_CHARGE' | 'InChI_STEREO' | 'InChI_ISOTOPE' | 'InChI_FIXEDH' | 'InChI_RECONNECT' | 'InChIKey'>(str),
program: str, program: str,
program_version: str, program_version: str,
}, },
pdbx_chem_comp_identifier: { pdbx_chem_comp_identifier: {
comp_id: str, comp_id: str,
identifier: str, identifier: str,
type: str, type: Aliased<'COMMON NAME' | 'SYSTEMATIC NAME' | 'CAS REGISTRY NUMBER' | 'PUBCHEM Identifier' | 'MDL Identifier' | 'SYNONYM'>(str),
program: str, program: str,
program_version: str, program_version: str,
}, },
......
...@@ -18,6 +18,7 @@ const coord = Schema.coord; ...@@ -18,6 +18,7 @@ const coord = Schema.coord;
const Aliased = Schema.Aliased; const Aliased = Schema.Aliased;
const Matrix = Schema.Matrix; const Matrix = Schema.Matrix;
const Vector = Schema.Vector; const Vector = Schema.Vector;
const List = Schema.List;
export const mmCIF_Schema = { export const mmCIF_Schema = {
atom_site: { atom_site: {
...@@ -29,7 +30,7 @@ export const mmCIF_Schema = { ...@@ -29,7 +30,7 @@ export const mmCIF_Schema = {
Cartn_x: coord, Cartn_x: coord,
Cartn_y: coord, Cartn_y: coord,
Cartn_z: coord, Cartn_z: coord,
group_PDB: str, group_PDB: Aliased<'ATOM' | 'HETATM'>(str),
id: int, id: int,
label_alt_id: str, label_alt_id: str,
label_asym_id: str, label_asym_id: str,
...@@ -73,11 +74,11 @@ export const mmCIF_Schema = { ...@@ -73,11 +74,11 @@ export const mmCIF_Schema = {
pdbx_number_of_molecules: float, pdbx_number_of_molecules: float,
pdbx_mutation: str, pdbx_mutation: str,
pdbx_fragment: str, pdbx_fragment: str,
pdbx_ec: str, pdbx_ec: List(',', x => x),
}, },
exptl: { exptl: {
entry_id: str, entry_id: str,
method: str, method: Aliased<'X-RAY DIFFRACTION' | 'NEUTRON DIFFRACTION' | 'FIBER DIFFRACTION' | 'ELECTRON CRYSTALLOGRAPHY' | 'ELECTRON MICROSCOPY' | 'SOLUTION NMR' | 'SOLID-STATE NMR' | 'SOLUTION SCATTERING' | 'POWDER DIFFRACTION' | 'INFRARED SPECTROSCOPY' | 'EPR' | 'FLUORESCENCE TRANSFER' | 'THEORETICAL MODEL'>(str),
}, },
struct_conf: { struct_conf: {
beg_label_asym_id: str, beg_label_asym_id: str,
...@@ -186,14 +187,14 @@ export const mmCIF_Schema = { ...@@ -186,14 +187,14 @@ export const mmCIF_Schema = {
}, },
pdbx_struct_oper_list: { pdbx_struct_oper_list: {
id: str, id: str,
type: str, type: Aliased<'identity operation' | 'point symmetry operation' | 'helical symmetry operation' | 'crystal symmetry operation' | '3D crystal symmetry operation' | '2D crystal symmetry operation' | 'transform to point frame' | 'transform to helical frame' | 'transform to crystal frame' | 'transform to 2D crystal frame' | 'transform to 3D crystal frame' | 'build point asymmetric unit' | 'build helical asymmetric unit' | 'build 2D crystal asymmetric unit' | 'build 3D crystal asymmetric unit'>(str),
name: str, name: str,
symmetry_operation: str, symmetry_operation: str,
matrix: Matrix(3, 3), matrix: Matrix(3, 3),
vector: Vector(3), vector: Vector(3),
}, },
pdbx_struct_assembly_gen: { pdbx_struct_assembly_gen: {
asym_id_list: str, asym_id_list: List(',', x => x),
assembly_id: str, assembly_id: str,
oper_expression: str, oper_expression: str,
}, },
......
...@@ -51,12 +51,12 @@ function createHierarchyData(atomsData: Atoms, offsets: HierarchyOffsets): Hiera ...@@ -51,12 +51,12 @@ function createHierarchyData(atomsData: Atoms, offsets: HierarchyOffsets): Hiera
}); });
const residues = Table.view(Table.ofColumns(Hierarchy.ResiduesSchema, { const residues = Table.view(Table.ofColumns(Hierarchy.ResiduesSchema, {
group_PDB: Column.Undefined(atomsData.count, Column.Schema.str), group_PDB: Column.Undefined(atomsData.count, Column.Schema.Aliased<'ATOM' | 'HETATM'>(Column.Schema.str)),
label_comp_id: atomsData.residueName, label_comp_id: atomsData.residueName,
auth_comp_id: atomsData.residueName, auth_comp_id: atomsData.residueName,
label_seq_id: atomsData.residueNumber, label_seq_id: atomsData.residueNumber,
auth_seq_id: atomsData.residueNumber, auth_seq_id: atomsData.residueNumber,
pdbx_PDB_ins_code: Column.Undefined(atomsData.count, Column.Schema.str) pdbx_PDB_ins_code: Column.Undefined(atomsData.count, Column.Schema.str),
}), Hierarchy.ResiduesSchema, offsets.residues); }), Hierarchy.ResiduesSchema, offsets.residues);
// Optimize the numeric columns // Optimize the numeric columns
Table.columnToArray(residues, 'label_seq_id', Int32Array); Table.columnToArray(residues, 'label_seq_id', Int32Array);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment