Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cheminfo-types

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheminfo-types - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

472

cheminfoTypes.d.ts
export interface ICPDilution {
factor?: number;
solvent?: string;
}
export interface ICPResult {
element: string;
wavelength?: Value;
experimentalConcentration?: Value;
dilution?: ICPDilution;
sampleConcentration?: Value;
}
export interface MeasurementXY<DataType extends DoubleArray = DoubleArray> {
/**
* A unique identifier for the measurement, preferably a UUID.
*/
id?: string;
/**
* Variables containing the data of the measurement.
* It must contain at least the variable `x` and `y`
*/
variables: MeasurementXYVariables<DataType>;
/**
* Title of the experiment. Often contains the sample code
*/
title?: string;
/**
* May contain the type of data. This is practical when you have a bunch of data
* of different types
*/
dataType?: string;
settings?: {
instrument?: Instrument;
[key: string]: any;
};
meta?: Record<string, any>;
derived?: Record<string, any>;
}
/**

@@ -42,30 +83,2 @@ * Describe a variable that can only contains as data an array of number

export interface MeasurementXY<DataType extends DoubleArray = DoubleArray> {
/**
* A unique identifier for the measurement, preferably a UUID.
*/
id?: string;
/**
* Variables containing the data of the measurement.
* It must contain at least the variable `x` and `y`
*/
variables: MeasurementXYVariables<DataType>;
/**
* Title of the experiment. Often contains the sample code
*/
title?: string;
/**
* May contain the type of data. This is practical when you have a bunch of data
* of different types
*/
dataType?: string;
settings?: {
instrument?: Instrument;
[key: string]: any;
};
meta?: Record<string, any>;
derived?: Record<string, any>;
}
export interface MeasurementXYVariables<

@@ -101,3 +114,48 @@ DataType extends DoubleArray = DoubleArray,

}
export interface NmrData2DContent {
z: Float64Array[];
minZ: number;
maxZ: number;
minY: number;
maxY: number;
minX: number;
maxX: number;
}
export type NmrData2D = NmrData2DFid | NmrData2DFt;
export interface NmrData2DFid {
re: NmrData2DContent;
im?: NmrData2DContent;
}
export interface NmrData2DFt {
rr: NmrData2DContent;
ri?: NmrData2DContent;
ir?: NmrData2DContent;
ii?: NmrData2DContent;
}
export interface NmrData1D {
x: Float64Array;
re: Float64Array;
im?: Float64Array;
}
/**
* In order to store an array of numbers we prefer to either use native javascript
* arrays or to use Float64Array
*/
export type DoubleArray = number[] | Float64Array;
export interface DataXY<DataType extends NumberArray = NumberArray> {
/**
* Array of numbers on x-axis
*/
x: DataType;
/**
* Array of numbers on y-axis
*/
y: DataType;
}
/**
* Quantity that is defined as range, e.g., melting point

@@ -115,6 +173,9 @@ */

}
export interface OCLMolecule {
idCode: string;
coordinates?: string;
index?: number[]; // should be 16 numbers in fact
/**
* Defines 2 limits as numbers
*/
export interface FromToXY {
from: PointXY;
to: PointXY;
}

@@ -178,4 +239,121 @@ /**

/**
* case we may have a text, ArrayBuffer or Uint8Array
* This type is used by the package `ensure-string` to ensure that the data
* is actually a string.
* This is very useful in the packages like `jcampconverter` or `xy-parser`
*/
export type TextData = string | BinaryData;
/** The instrument with which a spectrum was measured.
* CHMO: 0000998
*/
export interface Instrument {
/** The name of the instrument.
* @TJS-examples ["BELSORP MAX II"]
*/
model: string;
/** The name of the instrument manufacturer
* @TJS-examples ["Microtrac Retsch GmbH", "Bruker"]
*/
manufacturer: string;
/** The INTERNAL serial number of the instrument, e.g., the inventory number of the instrument in a university
* @TJS-examples ["B105863"]
*/
serialNumber?: string;
/** Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
* @TJS-examples ["345"]
*/
sku?: string;
/** The name of the software and the version number
* @TJS-examples ["BELMaster™ 7"]
*/
software?: Software;
location?: Location;
}
export interface PeakXYWidth {
x: number;
y: number;
width: number;
}
export interface OCLMolecule {
idCode: string;
coordinates?: string;
index?: number[]; // should be 16 numbers in fact
}
export type NumberMatrix =
| number[][]
| Int8Array[]
| Uint8Array[]
| Uint8ClampedArray[]
| Int16Array[]
| Uint16Array[]
| Int32Array[]
| Uint32Array[]
| Float32Array[]
| Float64Array[];
/**
* A type that allows one uppercase or lowercase letter
*/
export type OneUpperCase =
| 'A'
| 'B'
| 'C'
| 'D'
| 'E'
| 'F'
| 'G'
| 'H'
| 'I'
| 'J'
| 'K'
| 'L'
| 'M'
| 'N'
| 'O'
| 'P'
| 'Q'
| 'R'
| 'S'
| 'T'
| 'U'
| 'V'
| 'W'
| 'X'
| 'Y'
| 'Z';
export type BinaryData = ArrayBuffer | Uint8Array;
/**Describes the location of some object. */
export interface Location {
/** Name of the institution
* @TJS-examples ["EPFL", "Heriot-Watt University"]
*/
entity: string;
/** Name or code of the building
* @TJS-examples ["I17", "Main building"]
*/
building?: string;
/**Name or code of the room in which the object is localized
* @TJS-examples ["1 B3", "Lab 1"]
*/
room?: string;
/** Internal code that is used to identify the location
* @TJS-examples ["I17 1 B3"]
*/
code: string;
}
export type NumberArray =
| number[]
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array;
/**
* A type that allows one uppercase or lowercase letter
*/
export type OneLowerCase =

@@ -208,35 +386,21 @@ | 'a'

| 'z';
export interface Software {
/** Version of the software instance.
* @TJS-examples ['v0.0.1', 'rev111']
/** Value with units as https://schema.org/Value */
export interface Value {
/** The value of the quantitative value or property value node.
* @TJS-examples [0, 1000, 1345.24456, -10, -100]
*/
version?: string;
/** The name of the item.
* @TJS-examples ['tga-analysis', 'ChemDraw']
*/
name: string;
/** A description of the item. */
description?: string;
/** If the file can be downloaded, URL to download the binary
* @TJS-examples ['https://github.com/cheminfo/tga-spectrum/releases/tag/v0.16.0']
*/
url?: string;
value: number;
/** */
precision?: number;
/**A string or text indicating the unit of measurement. The unit could be validated in the input form based on the UN/CEFACT Common Code list */
units?: string;
}
/**
* In order to store an array of numbers we prefer to either use native javascript
* arrays or to use Float64Array
* Defines 2 limits as numbers
*/
export type DoubleArray = number[] | Float64Array;
export type NumberArray =
| number[]
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array;
export interface FromTo {
from: number;
to: number;
}
export interface PointXY {

@@ -270,123 +434,19 @@ a?: number;

}
export interface PeakXYWidth {
x: number;
y: number;
width: number;
}
/**
* Defines 2 limits as numbers
*/
export interface FromToXY {
from: PointXY;
to: PointXY;
}
/**Describes the location of some object. */
export interface Location {
/** Name of the institution
* @TJS-examples ["EPFL", "Heriot-Watt University"]
export interface Software {
/** Version of the software instance.
* @TJS-examples ['v0.0.1', 'rev111']
*/
entity: string;
/** Name or code of the building
* @TJS-examples ["I17", "Main building"]
version?: string;
/** The name of the item.
* @TJS-examples ['tga-analysis', 'ChemDraw']
*/
building?: string;
/**Name or code of the room in which the object is localized
* @TJS-examples ["1 B3", "Lab 1"]
name: string;
/** A description of the item. */
description?: string;
/** If the file can be downloaded, URL to download the binary
* @TJS-examples ['https://github.com/cheminfo/tga-spectrum/releases/tag/v0.16.0']
*/
room?: string;
/** Internal code that is used to identify the location
* @TJS-examples ["I17 1 B3"]
*/
code: string;
url?: string;
}
export type BinaryData = ArrayBuffer | Uint8Array;
/**
* A type that allows one uppercase or lowercase letter
*/
export type OneUpperCase =
| 'A'
| 'B'
| 'C'
| 'D'
| 'E'
| 'F'
| 'G'
| 'H'
| 'I'
| 'J'
| 'K'
| 'L'
| 'M'
| 'N'
| 'O'
| 'P'
| 'Q'
| 'R'
| 'S'
| 'T'
| 'U'
| 'V'
| 'W'
| 'X'
| 'Y'
| 'Z';
/** The instrument with which a spectrum was measured.
* CHMO: 0000998
*/
export interface Instrument {
/** The name of the instrument.
* @TJS-examples ["BELSORP MAX II"]
*/
model: string;
/** The name of the instrument manufacturer
* @TJS-examples ["Microtrac Retsch GmbH", "Bruker"]
*/
manufacturer: string;
/** The INTERNAL serial number of the instrument, e.g., the inventory number of the instrument in a university
* @TJS-examples ["B105863"]
*/
serialNumber?: string;
/** Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
* @TJS-examples ["345"]
*/
sku?: string;
/** The name of the software and the version number
* @TJS-examples ["BELMaster™ 7"]
*/
software?: Software;
location?: Location;
}
export type NumberMatrix =
| number[][]
| Int8Array[]
| Uint8Array[]
| Uint8ClampedArray[]
| Int16Array[]
| Uint16Array[]
| Int32Array[]
| Uint32Array[]
| Float32Array[]
| Float64Array[];
/** Value with units as https://schema.org/Value */
export interface Value {
/** The value of the quantitative value or property value node.
* @TJS-examples [0, 1000, 1345.24456, -10, -100]
*/
value: number;
/** */
precision?: number;
/**A string or text indicating the unit of measurement. The unit could be validated in the input form based on the UN/CEFACT Common Code list */
units?: string;
}
/**
* Defines 2 limits as numbers
*/
export interface FromTo {
from: number;
to: number;
}
/**
* Many libraries use a logger interface to log information about the processing

@@ -429,61 +489,1 @@ * This logger is expected to be compatible with the one from the `pino` library

}
export interface DataXY<DataType extends DoubleArray = DoubleArray> {
/**
* Array of numbers on x axis
*/
x: DataType;
/**
* Array of numbers on y axis
*/
y: DataType;
}
/**
* case we may have a text, ArrayBuffer or Uint8Array
* This type is used by the package `ensure-string` to ensure that the data
* is actually a string.
* This is very useful in the packages like `jcampconverter` or `xy-parser`
*/
export type TextData = string | BinaryData;
export interface ICPDilution {
factor?: number;
solvent?: string;
}
export interface ICPResult {
element: string;
wavelength?: Value;
experimentalConcentration?: Value;
dilution?: ICPDilution;
sampleConcentration?: Value;
}
export interface NmrData1D {
x: Float64Array;
re: Float64Array;
im?: Float64Array;
}
export interface NmrData2DContent {
z: Float64Array[];
minZ: number;
maxZ: number;
minY: number;
maxY: number;
minX: number;
maxX: number;
}
export type NmrData2D = NmrData2DFid | NmrData2DFt;
export interface NmrData2DFid {
re: NmrData2DContent;
im?: NmrData2DContent;
}
export interface NmrData2DFt {
rr: NmrData2DContent;
ri?: NmrData2DContent;
ir?: NmrData2DContent;
ii?: NmrData2DContent;
}
{
"name": "cheminfo-types",
"version": "1.7.2",
"version": "1.7.3",
"description": "Types for cheminfo packages and cheminfo data schema ",

@@ -15,11 +15,12 @@ "main": "./index.js",

"scripts": {
"precheck-types": "npm run prepack",
"build": "find src -name \"*.ts\" -exec grep -v import {} \\; > cheminfoTypes.d.ts",
"precheck-types": "npm run build",
"check-types": "tsc --noEmit",
"prepack": "find src -name \"*.ts\" -exec grep -v import {} \\; > cheminfoTypes.d.ts",
"eslint": "eslint src --cache",
"eslint-fix": "npm run eslint -- --fix",
"prepack": "npm run build",
"prettier": "prettier --check src",
"prettier-write": "prettier --write src",
"test": "npm run test-only && npm run eslint && npm run check-types",
"pretest-only": "npm run prepack",
"pretest-only": "npm run build",
"test-only": "tsd",

@@ -37,11 +38,11 @@ "generate-json": "ts-node json/buildJSON.ts"

"devDependencies": {
"eslint": "^8.39.0",
"eslint-config-cheminfo-typescript": "^11.3.1",
"eslint": "^8.57.0",
"eslint-config-cheminfo-typescript": "^12.2.0",
"js-yaml": "^4.1.0",
"pino": "^8.11.0",
"prettier": "^2.8.8",
"tsd": "^0.28.1",
"typescript": "^5.0.4",
"typescript-json-schema": "^0.56.0"
"pino": "^8.19.0",
"prettier": "^3.2.5",
"tsd": "^0.30.7",
"typescript": "^5.4.2",
"typescript-json-schema": "^0.63.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc