pubchem
Version:
pubchem simplifies the data retrieval from the PubChem API.
104 lines • 3.78 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompoundData = void 0;
const getComputedData_1 = require("./computed/getComputedData");
const getBoilingPoint_1 = require("./experimental/getBoilingPoint");
const getDensity_1 = require("./experimental/getDensity");
const getExperimentalData_1 = require("./experimental/getExperimentalData");
const getFlashPoint_1 = require("./experimental/getFlashPoint");
const getMeltingPoint_1 = require("./experimental/getMeltingPoint");
const getSolubility_1 = require("./experimental/getSolubility");
const getVaporPressure_1 = require("./experimental/getVaporPressure");
const getReferences_1 = require("./getReferences");
const getFormula_1 = require("./identifiers/getFormula");
const getIdentifiers_1 = require("./identifiers/getIdentifiers");
const getInChI_1 = require("./identifiers/getInChI");
const getInChIKey_1 = require("./identifiers/getInChIKey");
const getSMILES_1 = require("./identifiers/getSMILES");
const getGHS_1 = require("./safety/getGHS");
class CompoundData {
constructor(data) {
this.data = data;
}
getReferences() {
return (0, getReferences_1.getReferences)(this.data);
}
getExperimentalData(options) {
return (0, getExperimentalData_1.getExperimentalData)(this.data, options);
}
getIdentifiers() {
return (0, getIdentifiers_1.getIdentifiers)(this.data);
}
get computed() {
return (0, getComputedData_1.getComputedData)(this.data);
}
/**
* Property containing a summary of GHS information
*/
get ghs() {
return (0, getGHS_1.getGHSSummary)(this.data);
}
getGHSSummary(options) {
return (0, getGHS_1.getGHSSummary)(this.data, options);
}
/**
* Canonical SMILES
*/
getSMILES() {
return (0, getSMILES_1.getSMILES)(this.data);
}
/**
* Return molecular formula in Hill notation
*/
getFormula() {
return (0, getFormula_1.getFormula)(this.data);
}
/**
* Return the International Chemical Identifier (InChI) computed from chemical structure using the International Union of Pure and Applied Chemistry (IUPAC) standard
*/
getInChI() {
return (0, getInChI_1.getInChI)(this.data);
}
/**
* International Chemical Identifier hash (InChIKey) computed from chemical structure using the International Union of Pure and Applied Chemistry (IUPAC) standard.
*/
getInChIKey() {
return (0, getInChIKey_1.getInChIKey)(this.data);
}
/**
* Detailed information about GHS information
*/
getGHS() {
return (0, getGHS_1.getGHS)(this.data);
}
getMeltingPoint(options) {
return (0, getMeltingPoint_1.getMeltingPoint)(this.data, options);
}
getBoilingPoint(options) {
return (0, getBoilingPoint_1.getBoilingPoint)(this.data, options);
}
getDensity(options) {
return (0, getDensity_1.getDensity)(this.data, options);
}
getVaporPressure(options) {
return (0, getVaporPressure_1.getVaporPressure)(this.data, options);
}
getSolubility() {
return (0, getSolubility_1.getSolubility)(this.data);
}
getFlashPoint(options) {
return (0, getFlashPoint_1.getFlashPoint)(this.data, options);
}
toJSON() {
const methods = Object.entries(Object.getOwnPropertyDescriptors(CompoundData.prototype))
.filter(([, descriptor]) => typeof descriptor.get === 'function')
.map(([key]) => key);
const result = {};
for (const method of methods) {
result[method] = this[method];
}
return result;
}
}
exports.CompoundData = CompoundData;
//# sourceMappingURL=CompoundData.js.map