ChemNOR class

ChemNOR class is responsible for finding relevant chemical compounds based on an application description.

It uses Google Gemini AI to suggest relevant SMILES (Simplified Molecular Input Line Entry System) patterns and queries the PubChem database to find compounds matching those patterns.

Constructors

ChemNOR({required String genAiApiKey, required String model})
Constructor for ChemNOR, requires an API key for Google Generative AI. Optionally specify a Gemini model to use (defaults to gemini-2.5-flash).

Properties

chempubBaseUrl String
Base URL for PubChem API.
final
genAiApiKey String
API key for Google Generative AI.
final
hashCode int
The hash code for this object.
no setterinherited
maxResultsPerSmiles int
Maximum number of results per SMILES pattern.
final
model String
The Gemini model to use for AI-assisted tasks
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

chat(String userInput, String context) Future<String?>
chemist(String userInput) Future<String?>
findListOfCompounds(String applicationDescription) Future<String>
Finds relevant chemical compounds for a given application description.
findListOfCompoundsJSN(String applicationDescription) Future
generateContent(String userInput, String systemInstruction) Future<String>
Generates content using Google Gemini AI based on user input and system instruction.
getCompoundProperties(int cid) Future<Map<String, dynamic>>
Fetches compound properties from PubChem using the given CID.
getRelevantSmiles(String description) Future<List<String>>
Uses Google Gemini AI to suggest relevant SMILES patterns based on the given application description.
getSubstructureCids(String smiles) Future<List<int>>
Searches PubChem for compounds containing the given SMILES pattern.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

availableModels List<String>
List of all available Gemini model names
no setter