Macromolecules updates

Datagrok Biostructure viewer (BiostructureViewer v. 2.0.15) now supports custom data providers’ functions. Just annotate your custom function/script/query as shown in the example with //meta.dataProvider: Molecule3D, and you can specify/select it for the biostructureDataProvider property of the viewer. Be aware that the viewer expects a returning value of the BiostructureData type to treat it properly (with binary, data, and ext fields).
Note: supplementing your provider with in-browser cache capability is as simple as adding another annotation line //meta.cache: client.

//language: javascript
//name: RCSB Data Provider
//meta.dataProvider: Molecule3D
//meta.cache: client
//meta.invalidateOn: 0 0 1 * * ?
//input: string id
//output: string result
const url = 'https://files.rcsb.org/download/'+ id + '.cif';
const response = await fetch(url);
if (!response.ok)
  throw new Error(response.statusText);
const data = await response.text();
const result = await grok.functions.call(
  'BiostructureViewer:biostructureDataToJson', 
  {binary: false, data: data, ext: 'cif', options: {name: id}});

BsV-custom-data-provider-Molecule3D-1600

3 Likes

Is the package included Bio or Biostructure Viewer??
It’s really cool package. I would like to use in my project!
Thanks,

Hi Taka, this whole thread is about our support for marcomolecules (the following packages: Bio, Peptides, BiostructureViewer, Docking, SequenceTranslator, Helm, etc). Bio is a central package that the others depend on (just like HitTriage and Marvin depend on Chem).

The package that Alexander referred to is BiostructureViewer.

Let’s setup a call to demo our capabilities and see how they fit with your needs?

2 Likes