Add a property .biostructureDataProvider for the name of the custom data provider function.
Add a property .biostructureIdColumnName to follow for the current row of the data frame linked to the viewer.
An example for custom biostructure data provider
//name: RCSB mmCIF
//description: Get biostructure by id as mmCIF
//meta.dataProvider: Molecule3D
//meta.cache: client
//meta.invalidateOn: 0 0 1 * * ?
//input: string id
//output: object result
export async function getBiostructureRcsbMmcif(id: string): Promise<BiostructureData> {
const url = `https://files.rcsb.org/download/${id}.cif`;
const response = await fetch(url);
if (!response.ok)
throw new Error(response.statusText);
const data: string = await response.text();
return {binary: false, data: data, ext: 'cif', options: {name: id}};
}
Add a property
.biostructureDataProvider
for the name of the custom data provider function. Add a property.biostructureIdColumnName
to follow for the current row of the data frame linked to the viewer.An example for custom biostructure data provider