diff --git a/data/cif-field-names/mmcif-field-names.csv b/data/cif-field-names/mmcif-field-names.csv index 860ac4780936985d84b882a71ae6b96c3d0327d4..c5b1751cff28ae44eec1e01c711fbbf207b3a003 100644 --- a/data/cif-field-names/mmcif-field-names.csv +++ b/data/cif-field-names/mmcif-field-names.csv @@ -24,6 +24,7 @@ atom_site.auth_asym_id atom_site.auth_seq_id atom_site.pdbx_PDB_model_num atom_site.ihm_model_id +atom_site.pdbx_label_index atom_site.pdbx_sifts_xref_db_name atom_site.pdbx_sifts_xref_db_acc atom_site.pdbx_sifts_xref_db_num diff --git a/src/mol-io/reader/cif/schema/mmcif.ts b/src/mol-io/reader/cif/schema/mmcif.ts index 94e387d625415e3f6e9f212026754833f757c771..cd21924adb584d0f81a897f5b26d5ca42b06e0bc 100644 --- a/src/mol-io/reader/cif/schema/mmcif.ts +++ b/src/mol-io/reader/cif/schema/mmcif.ts @@ -215,6 +215,11 @@ export const mmCIF_Schema = { * formal charge assignment normally found in chemical diagrams. */ pdbx_formal_charge: int, + /** + * This data item is an ordinal which identifies distinct chemical components in the atom_site category, both + * polymeric and non-polymeric. + */ + pdbx_label_index: int, /** * The name of additional external databases with residue level mapping. */ diff --git a/src/mol-model/structure/export/categories/atom_site.ts b/src/mol-model/structure/export/categories/atom_site.ts index 77729c73e6a52e901f2d41909449bbb364847066..6f082686b5ac457c6970aba2b4b75eca9df717bc 100644 --- a/src/mol-model/structure/export/categories/atom_site.ts +++ b/src/mol-model/structure/export/categories/atom_site.ts @@ -30,6 +30,17 @@ function atom_site_auth_asym_id(e: StructureElement.Location) { return l + suffix; } + +const atom_site_pdbx_label_index = { + shouldInclude(s: AtomSiteData) { + return !!s.atom_site?.pdbx_label_index.isDefined; + }, + value(e: StructureElement.Location, d: AtomSiteData) { + const srcIndex = d.sourceIndex.value(e.element); + return d.atom_site!.pdbx_label_index.value(srcIndex); + }, +}; + const SIFTS = { shouldInclude(s: AtomSiteData) { return SIFTSMapping.isAvailable(s.structure.models[0]); @@ -113,6 +124,8 @@ const atom_site_fields = () => CifWriter.fields<StructureElement.Location, AtomS .int('pdbx_PDB_model_num', P.unit.model_num, { encoder: E.deltaRLE }) + .int('pdbx_label_index', atom_site_pdbx_label_index.value, { shouldInclude: atom_site_pdbx_label_index.shouldInclude }) + // SIFTS .str('pdbx_sifts_xref_db_name', SIFTS.pdbx_sifts_xref_db_name.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_name.valueKind }) .str('pdbx_sifts_xref_db_acc', SIFTS.pdbx_sifts_xref_db_acc.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_acc.valueKind }) diff --git a/src/mol-model/structure/structure/util/superposition-db-mapping.ts b/src/mol-model/structure/structure/util/superposition-db-mapping.ts index 725826622095f1c9286de1e8e057489aadda3a35..2c220eae6ea6f8186a33a80ce03b9c74c9c88336 100644 --- a/src/mol-model/structure/structure/util/superposition-db-mapping.ts +++ b/src/mol-model/structure/structure/util/superposition-db-mapping.ts @@ -5,7 +5,6 @@ */ import { Segmentation } from '../../../../mol-data/int'; -import { Mat4 } from '../../../../mol-math/linear-algebra'; import { MinimizeRmsd } from '../../../../mol-math/linear-algebra/3d/minimize-rmsd'; import { SIFTSMapping } from '../../../../mol-model-props/sequence/sifts-mapping'; import { ElementIndex } from '../../model/indexing';