message: prefer EMDB map for 'ELECTRON CRYSTALLOGRAPHY' entries
diff: @@ -17,12 +17,26 @@ export function getStreamingMethod(s?: Structure, defaultKind: VolumeServerInfo.
  const model = s.models[0];
  if (model.sourceData.kind !== 'mmCIF') return defaultKind;
  - const data = model.sourceData.data.exptl.method;
  - for (let i = 0; i < data.rowCount; i++) {
  - const v = data.value(i).toUpperCase();
  + const { data } = model.sourceData;
  +
  + // prefer EMDB entries over structure-factors (SF) e.g. for 'ELECTRON CRYSTALLOGRAPHY' entries
  + // like 6axz or 6kj3 for which EMDB entries are available but map calculation from SF is hard
  + for (let i = 0, il = data.pdbx_database_related._rowCount; i < il; ++i) {
  + if (data.pdbx_database_related.db_name.value(i).toUpperCase() === 'EMDB') {
  + return 'em'
  + }
  + }
  +
  + if (data.pdbx_database_status.status_code_sf.isDefined && data.pdbx_database_status.status_code_sf.value(0) === 'REL') {
  + return 'x-ray'
  + }
  +
  + // fallbacks
  + for (let i = 0; i < data.exptl.method.rowCount; i++) {
  + const v = data.exptl.method.value(i).toUpperCase();
  if (v.indexOf('MICROSCOPY') >= 0) return 'em';
  }
  - return 'x-ray';
  + return defaultKind;
  }
  /** Returns EMD ID when available, otherwise falls back to PDB ID */
  