Creates an instance of MoleculesDB.
openchemlib library
Optionaloptions: { computeProperties?: boolean; keepEmptyMolecules?: boolean } = {}Options.
Append the property data.color to each entry based on a data or property label
{object} [options={}]
{string} [options.dataLabel] name of the property from data to use
{string} [options.propertyLabel] name of the property from properties to use
{number} [options.colorLabel='color'] name of the property to add in data that will contain the color
{number} [options.minValue]
{number} [options.maxValue]
{number} [options.minHue=0]
{number} [options.maxHue=360]
{number} [options.saturation=65] percent of color saturation
{number} [options.lightness=65] percent of color lightness
append to the current database a CSV file
text file containing the comma separated value file
Optionaloptions: {options.
OptionaldynamicTyping?: booleandynamically type the data (convert values to number of boolean if possible)
Optionalheader?: booleanif the first line of the file is a header
OptionalonStep?: Functioncall back to execute after each molecule
OptionalskipEmptyLines?: booleanskip empty lines
Append an array of entries to the current database. An entry is an object that by default should contain a 'ocl' property containing idCode and optionally index and coordinates
Optionaloptions: {OptionalcoordinatesPath?: stringOptionalidCodePath?: stringOptionalindexPath?: stringOptionalmolfilePath?: stringOptionalmwPath?: stringOptionalonStep?: Functioncall back to execute after each molecule
OptionalsmilesPath?: stringAppend a SDF to the current database
text file containing the sdf
Optionaloptions: { dynamicTyping?: boolean; eol?: string; mixedEOL?: boolean; onStep?: Function }options
OptionaldynamicTyping?: booleanDynamically type the data
Optionaleol?: stringSpecify the end of line character. Default will be the one found in the file
OptionalmixedEOL?: booleanSet to true if you know there is a mixture between \r\n and \n
OptionalonStep?: Functioncallback to execute after each molecule
Append a list of SMILES to the current database.
text file containing a list of smiles
Optionaloptions: { onStep?: Function }Options
OptionalonStep?: Functioncall back to execute after each molecule
Returns an array with the current database
Add a molecule to the current database.
The molecule to append.
Optionaldata: objectOptions.
OptionalmoleculeInfo: objectMay contain precalculated index and mw.
Add an entry in the database.
a molecule as a JSON that may contain the following properties: molfile, smiles, idCode, mf, index
Optionaldata: objectSearch in a MoleculesDB Inside the database all the same molecules are group together
Optionalquery: string | Moleculesmiles, molfile, idlCode or instance of Molecule to look for
Optionaloptions: {Options
OptionalflattenResult?: booleanThe database group the data for the same product. This allows to flatten the result
Optionalformat?: "smiles" | "molfile" | "smarts" | "idCode"query format
OptionalkeepMolecule?: booleankeep the OCL.Molecule object in the result
Optionallimit?: numbermaximal number of result
Optionalmode?: "exact" | "substructure" | "substructureOR" | "similarity" | "exactNoStereo"search algorithm
array of object of the type {(molecule), idCode, data, properties}
Search in a MoleculesDB Inside the database all the same molecules are group together
Optionalquery: string | Moleculesmiles, molfile, idCode or instance of Molecule to look for
Optionaloptions: {Options.
Optionalcontroler?: AbortControllercallback to execute to check if the search should be aborted
OptionalflattenResult?: booleanThe database group the data for the same product. This allows to flatten the result
Optionalformat?: "smiles" | "molfile" | "smarts" | "idCode"query format
Optionalinterval?: numberinterval in ms to call the onStep callback
OptionalkeepMolecule?: booleankeep the OCL.Molecule object in the result
Optionallimit?: numbermaximal number of result
Optionalmode?: "exact" | "substructure" | "substructureOR" | "similarity" | "exactNoStereo"search algorithm
OptionalonStep?: Functioncallback to execute after each interval
array of object of the type {(molecule), idCode, data, properties}
this.db is an object with properties 'oclID' that has as value an object that contains the following properties: molecule: an OCL molecule instance index: OCL index used for substructure searching properties: all the calculates properties data: array containing free data associated with this molecule