|
@@ -12,9 +12,9 @@ import { _atom_site } from './categories/atom_site';
|
|
|
import CifCategory = CifWriter.Category
|
|
|
import { _struct_conf, _struct_sheet_range } from './categories/secondary-structure';
|
|
|
import { _pdbx_struct_mod_residue } from './categories/modified-residues';
|
|
|
-import { _chem_comp, _pdbx_chem_comp_identifier } from './categories/misc';
|
|
|
+import { _chem_comp, _pdbx_chem_comp_identifier, _pdbx_nonpoly_scheme } from './categories/misc';
|
|
|
import { Model } from '../model';
|
|
|
-import { getUniqueEntityIndicesFromStructures } from './categories/utils';
|
|
|
+import { getUniqueEntityIndicesFromStructures, copy_mmCif_category } from './categories/utils';
|
|
|
import { _struct_asym, _entity_poly, _entity_poly_seq } from './categories/sequence';
|
|
|
import { ModelPropertyDescriptor } from '../model/properties/custom';
|
|
|
|
|
@@ -35,19 +35,6 @@ export namespace CifExportContext {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function copy_mmCif_category(name: keyof mmCIF_Schema): CifCategory<CifExportContext> {
|
|
|
- return {
|
|
|
- name,
|
|
|
- instance({ structures }) {
|
|
|
- const model = structures[0].model;
|
|
|
- if (model.sourceData.kind !== 'mmCIF') return CifCategory.Empty;
|
|
|
- const table = model.sourceData.data[name];
|
|
|
- if (!table || !table._rowCount) return CifCategory.Empty;
|
|
|
- return CifCategory.ofTable(table);
|
|
|
- }
|
|
|
- };
|
|
|
-}
|
|
|
-
|
|
|
const _entity: CifCategory<CifExportContext> = {
|
|
|
name: 'entity',
|
|
|
instance({ structures }) {
|
|
@@ -91,6 +78,7 @@ const Categories = [
|
|
|
_pdbx_chem_comp_identifier,
|
|
|
copy_mmCif_category('atom_sites'),
|
|
|
|
|
|
+ _pdbx_nonpoly_scheme,
|
|
|
_pdbx_struct_mod_residue,
|
|
|
|
|
|
// Atoms
|