| import { getUrlParam } from "@/Core/UrlParams"; |
|
|
| export enum Tag { |
| All = "all", |
| Docking = "docking", |
| Visualization = "visualization", |
| Modeling = "modeling", |
| Cheminformatics = "cheminformatics", |
| LeadOptimization = "lead-optimization", |
| } |
|
|
| const tagShortDescriptions: { [key in Tag]: string } = { |
| [Tag.All]: "Access all available tools and features.", |
| [Tag.Docking]: "Focus on computational prediction of protein-ligand interactions.", |
| [Tag.Visualization]: "Focus on visual exploration of molecular structures.", |
| [Tag.Modeling]: "Focus on building and modifying molecular structures.", |
| [Tag.Cheminformatics]: "Focus on chemical structures and their properties.", |
| [Tag.LeadOptimization]: "Focus on the iterative process of improving the binding affinities of compounds (ligands).." |
| }; |
|
|
| const tagLongDescriptions: { [key in Tag]: string } = { |
| [Tag.All]: "Recommended for users who need the full range of capabilities or who are performing multiple types of tasks.", |
| [Tag.Docking]: "Ideal for researchers studying how small molecules bind to protein targets.", |
| [Tag.Visualization]: "Perfect for examining structural details and creating high-quality molecular visualizations for publications or presentations.", |
| [Tag.Modeling]: "Suitable for researchers who need to prepare molecules for computational analysis or modify existing structures.", |
| [Tag.Cheminformatics]: "Designed for analyzing molecular features and managing chemical information systematically.", |
| [Tag.LeadOptimization]: "Ideal for researchers working to optimize candidate molecules." |
| }; |
|
|
| const appTags: Tag[] = []; |
|
|
| |
| |
| |
| export function setupTags() { |
| |
| const tags = getUrlParam("focus"); |
| if (tags) { |
| |
| const tagArray = tags.split(","); |
| |
| for (const tag of tagArray) { |
| |
| if (Object.values(Tag).includes(tag as Tag)) { |
| appTags.push(tag as Tag); |
| } |
| } |
| } |
|
|
| if (appTags.length === 0) { |
| appTags.push(Tag.All); |
| } |
|
|
| console.log(appTags); |
| } |
|
|
| |
| |
| |
| |
| |
| |
| export function matchesTag(pluginTags: Tag[]): boolean { |
| |
| if (pluginTags.includes(Tag.All)) { |
| return true; |
| } |
|
|
| |
| if (appTags.includes(Tag.All)) { |
| return true; |
| } |
|
|
| |
| for (const tag of appTags) { |
| if (pluginTags.includes(tag)) { |
| return true; |
| } |
| } |
|
|
| return false; |
| } |
|
|
| |
| |
| |
| |
| |
| export function getActivityFocusMode(): string { |
| |
| let mode = getUrlParam("focus"); |
| if (mode === null) { |
| mode = "all"; |
| } |
| return mode; |
| } |
|
|
| |
| |
| |
| |
| |
| |
| export function getActvityFocusModeDescription(mode: string): string[] { |
| return [tagShortDescriptions[mode as Tag], tagLongDescriptions[mode as Tag]]; |
| } |
|
|
|
|
| |
| |
| |
| |