|
@@ -30,6 +30,17 @@ function atom_site_auth_asym_id(e: StructureElement.Location) {
|
|
return l + suffix;
|
|
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 = {
|
|
const SIFTS = {
|
|
shouldInclude(s: AtomSiteData) {
|
|
shouldInclude(s: AtomSiteData) {
|
|
return SIFTSMapping.isAvailable(s.structure.models[0]);
|
|
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_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
|
|
// 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_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 })
|
|
.str('pdbx_sifts_xref_db_acc', SIFTS.pdbx_sifts_xref_db_acc.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_acc.valueKind })
|