123456789101112131415161718192021222324252627 |
- /**
- * Copyright (C) 2023, Protein Bioinformatics Research Group, RCNS
- *
- * Licensed under CC BY-NC 4.0, see LICENSE file for more info.
- *
- * @author Gabor Tusnady <tusnady.gabor@ttk.hu>
- * @author Csongor Gerdan <gerdan.csongor@ttk.hu>
- */
- import { PDBTMDescriptor } from "./tmdet-extension/types";
- import { setMembraneOrientation, TmDetDescriptorCache } from "./tmdet-extension/prop";
- import { createMembraneOrientation } from "./tmdet-extension/transformation";
- import { DebugUtil } from "./tmdet-extension/debug-utils";
- export async function fetchDescriptor(url: string) {
- const response = await fetch(url);
- const descriptor = await response.json();
- return descriptor;
- }
- export async function registerRegionDescriptorData(url: string, side1: "Inside"|"Outside"|null) {
- const pdbtmDescriptor: PDBTMDescriptor = await fetchDescriptor(url);
- pdbtmDescriptor.side1 = side1;
- TmDetDescriptorCache.add(pdbtmDescriptor);
- const membraneOrientation = createMembraneOrientation(pdbtmDescriptor);
- setMembraneOrientation(membraneOrientation);
- DebugUtil.log('TMDET Membrane Orientation Params:', membraneOrientation);
- }
|